-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Suggestion] export settings from maintenance go to dowloads folder or straight to google drive #3296
Comments
Storing config to some cloud is a way .... But changing diricetory will be impossible with upcomming Android versions anyway |
Suggestion: I'm using FolderSsync to automagically sync AAPS settings the (cloud) storage of my choice. |
xDrip has automatic backup to google drive which is very useful |
@MilosKozak Could we add some sort of automatic backup like that? And we could see how Xdrip has this handled... My proposal would be to create export in such way that we just add date in readable format to the end (for example settings_20240702_1202.zip) and then copy it to specific google drive directory... |
the problem is encryption of backup. AAPS doesn't know master password |
@MilosKozak => maybe we can ask the user to input the password when it's time for a backup? I recently ran into the same issue. It has also been discussed in 2022 here: #1208 (comment) The options provided there were:
I would vote for a combination of 1 and 4 and for 4 (although more cumbersome) we could use mongodb via Nightscout for backupstorage |
@MilosKozak As far as I can see the (sole?) purpose of encrypting the settings export file is to prevent sharing settings for the purpose of circumventing the need for acquiring the AAPS objectives. Right? I will not share details, but most of you will know this can be overcome fairly easily without the need for any special tooling. So to enable automatic backup of the settings using encryption the encryption key (e.g. password) need to be available to AAPS. Currently this is not the case and user is always asked to enter the password for exporting or importing settings. Proposal#1: Proposal#2:
Note: This solution is not fully secure and would require a working NS site. But would make it more complicated to share the encrypted settings file (at least for non-dev users) Proposal#1 would be my choice. |
@vanelsberg Option 1 should be doable, there is simple Android way to Secure application settings and it should be pretty secure. @KelvinKramp I looked at Google Drive API and is not very simple to use... You would expect that you could specify username and password (or even use settings directly from configured account on phone), but not such luck... Using Dropbox might be much easier, but I would like to avoid that way (person can have just 1 free Dropbox and if person is already is using it for some other stuff, using it for AAPS at same time would be a problem)... And using Nightscout ... I don't think we should use it... Lot of people stopped using it... but maybe someone has some other idea... Someone mentioned that XDrip is using Cloud for backup, maybe we should look into that. |
Ok. Update on Cloud backup. I found that Xdrip had cloud backup (added in 2022): https://navid200.github.io/xDrip/docs/GoogleDriveBackup.html , so we could do something similar here, as soon as we can do automatic backup... Tested and it it is working (but my backup size was 150 Mb, which is why it took so long (and I thought it was broken) - I have been using Xdrip for over 10 years, which explains size of database). |
Ok, I'll have a look at that then. |
Delay because of personal/family priorities. Just started some work on this. will try some draft/concept and when I like it, go for a draft/PR for dev's to review. |
@MilosKozak @olorinmaia I think the AAPS master password is mostly needed for preventing users to export and share their AAPS settings which include objectives. Will not go into details, but most dev will know there are easy solution for doing this without the need for knowing the password ;-) So I decide for a solution where the password entered by the user on settings export is stored on the phone's android datastore (which should be acceptable for this purpose when user has a choice). If the stored password is not used for export within N days (default=7) it is removed from the store and user is notified to re-enter. Now have a working implementation for exporting AAPS settings through (scheduled) automation. Dev should be able to build on this f.i. for exporting to Cloud or triggering exports on pump-activation. @MilosKozak Planning to do a PR on dev for this week? |
Btw: planning to look into writing to cloud storage line Onedrive or Google drive. |
@vanelsberg Thanks for looking into this! :) Sounds like you are making great progress here on this very useful feature request. In dev there is an automation rule now allowing for certain events to happen if canula age is x hours etc. So, one could say if 0 hours run backup automatically. Since xDrip has a working automatic backup towards Google drive, maybe that's the best place to start? I can surely help with reviewing/testing PR. |
@olorinmaia Tnx! PR caches password on local phone. Stored pass word will expire when not used. |
@olorinmaia @MilosKozak See PR3296 auto export (DRAFT) #3451 Testing:
Wait at least 1 day (=24hrs): (And most importantly, make sure the exported settings file is importing correctly) |
Additional note: As this PR was initiated to start supporting to the original feature request - so it does not match with the original titel of this issue - so naming it PR3296 is bit confusing. Will move further development on this to a new issue for now |
Without a proper file sorting system, it can be annoying (and potentially confusing) to get the settings export onto the cloud. The option to send it straight to google drive would probably result in more people backing up more frequently, and would be more helpful for people who aren't as good at working with technology.
The text was updated successfully, but these errors were encountered: