Open mfietz opened 8 years ago
Now-duplicate of #2393?
I would like to see this also. automatic export of the database with variable retention length.
I would also like to see the settings backed up, but never having looked a the code moving all of the settings into the database may be a lot of work.
thanks.
Given that https://github.com/AntennaPod/AntennaPod/issues/2463 is still happening, this feature would be very helpful to prevent data loss.
Auto backup would be really cool to add.
I would like to tackle this ticket @ByteHamster
Here are my thoughts about this feature
1) Default backup of 30 days, every day take 1 database backup
2) Because we have added timestamp to the filename like AntennaPodBackup-2020-03-24.db
, the auto backup filenames will be stored in a subdirectory named AntennaPod-autobackup
and filenames should be AntennaPodBackup-v1.db
to AntennaPodBackup-v30.db
- the user can look at the timestamp of the file to see which is the most recent version
3) We just reuse the names and override and keep no more than 30 days of auto backup.
4) Auto backup happens before a refresh of feeds and it's default to be on
I would not want to add another settings for this, except to turn off the feature (but I was thinking of not making it optional)
Think this issue is about something slightly different. It is about Google's app backup mechanism that allows to restore settings/subscriptions on a new device or when re-installing the app. We can not upload the full database because backups are limited to 2MB, as far as I know. There is already some code in place that uploads the subscriptions to Google's backup service if you enabled it for your phone. I have not tried if it works properly, though.
Making actual backup database exports to the sd card (which users need to take care of) seems like a thing that would not be used by average users. Though, the app WhatsApp does that, too. Not sure if a feature like that would be a good idea.
If this is to work around #2463, I would rather try to fix that instead of adding a new feature. Looks like the sqlite
binary is shipped with all Android systems and is in many cases able to open/repair the database even if the Android system thinks that the database is broken.
Default backup of 30 days, every day take 1 database backup
I would like to request an option to always overwrite the same file. That way you can automatically backup that file out of band.
Got it, I intended to write the to SD card regularly. Backing up to a single file sounds fine then allowing the user to always restore.
Think this issue is about something slightly different. It is about Google's app backup mechanism that allows to restore settings/subscriptions on a new device or when re-installing the app. We can not upload the full database because backups are limited to 2MB, as far as I know. There is already some code in place that uploads the subscriptions to Google's backup service if you enabled it for your phone. I have not tried if it works properly, though.
@ByteHamster Looks like now the data stored on google is 25MB, but my AntennaPodBackup file is already at 54MB database. https://developer.android.com/guide/topics/data/autobackup
Backing up preferences to Google seems like a good option
Making actual backup database exports to the sd card (which users need to take care of) seems like a thing that would not be used by average users. Though, the app WhatsApp does that, too. Not sure if a feature like that would be a good idea.
The comparison to WhatsApp is a nice one. I think it could be helpful in different cases, and doesn't add extra options for the use user (but it would add extra things to maintain).
Backing up preferences to Google seems like a good option
To be honest I feel there's no point in backing up options (which can relatively easily be restored) if we don't store the app's main data. Better no integration than a half-baked one.
There is a new open source backup application SeedVault this is included in more and more custom roms like AOSP,LOS,CalyOS,GrapheneOS, it would be nice if we can use this.
Technical it works like Google Backup,but to your own cloud or on the device /USB.
Android Developer enable Backup
What do you think?
Micha
@Micha-Btz Thanks for chipping in :) I suppose you're referring to this project? That's an interesting one. It would be great if we could support/integrate with it. But it is only baked in in a limited set of custom ROMs as I understand (and cannot be installed as a standalone app), thus wouldn't help (as it stands) the majority of our users. So I'd say it would be of lower priority than any generic solution discussed before.
Oh, c&p mistake by me, I have edited my post to correct the links.
Since the most custom roms relying on AOSP and LOS, there would be in near future all I think :-) But you are right, it is not installable as standalone app.
This issue has been mentioned on AntennaPod Forum. There might be relevant details there:
https://forum.antennapod.org/t/synchronizing-without-gpodder/513/4
This issue has been mentioned on AntennaPod Forum. There might be relevant details there:
https://forum.antennapod.org/t/should-gpodder-net-be-supported-long-term/396/24
This issue has been mentioned on AntennaPod Forum. There might be relevant details there:
https://forum.antennapod.org/t/should-gpodder-net-be-supported-long-term/396/27
What we could store is the list of subscriptions, so that at least some data is stored automatically for users who don’t enable sync. (@ByteHamster in the forum)
Agree that'd be a good base. If done, settings could be backed up as well.
Looks like now the data stored on google is 25MB, but my AntennaPodBackup file is already at 54MB database. https://developer.android.com/guide/topics/data/autobackup
I've got a whole bunch of podcasts, and my most recent database export was 69.1 MiB, but I can bring that down to 18.6 MiB with gzip -9, 12.7 MiB with zstd -15, or 9.7 MiB with xz -9, well below the limit.
Maybe the regular database export should be compressed.
This issue has been mentioned on AntennaPod Forum. There might be relevant details there:
https://forum.antennapod.org/t/back-up-the-apps-settings/388/8
At the very least could we get an automated export written to an OPML file somewhere on the users Google Drive? Surely that isn't going to be too huge if size of export is still a factor for deciding how to address this.
This: http://developer.android.com/training/backup/autosyncapi.html
(Basically, this is to announce that I started working on it and no one else is doing the same.)