NeoApplications / Neo-Backup

backup manager for android
GNU Affero General Public License v3.0
2.52k stars 124 forks source link

[Feature Request] Differential Backup #695

Open jochen-01 opened 1 year ago

jochen-01 commented 1 year ago

Is your feature request related to a problem? Please describe it. I like to follow a backup strategy used widely in data management since decades: Differential backups of programs and data. Full backups requires much time and much storage.

System Information (please complete the following information):

Additional Notes

I think it's clear what I want to do: Full backups let's say, every month. Between these full backups differential backups (perhaps) every day. From a programming point of view differential backups are much easier to implement than incremental backups, therefore I would suggest to realize just differential backups.

hg42 commented 1 year ago

please answer these simple questions first:

jochen-01 commented 1 year ago

Currently I'd like to use 2 generations, since I want to use 4 differential backups. One monthly full backup and 3 weekly differential backups. Perhaps I have to explain my whole backup strategy: I make make local backups on phones' MicroSD. Monthly I backup that MicroSD to a server using rsnapshot.

Additional storage (I think you mean "disk" space on backup target?). Making backups like that I think I can reduce the backups I have to keep. Thus the differential backup should not use much additional space.

hg42 commented 1 year ago

Yes, with storage I meant the target storage system for the backup.

Is your main concern about backup size or about backup creation time (on the phone) or about transfer time to the server?

My questions were about getting expectations and reality in sync.

Your original "1 monthly full + 30 daily differential" strategy with for example an average of 10% for each incremental backup would take up 4 times of the space. The time is also questionable, because comparing the old with the new backup also takes time and involves reading all the data.

With 1 monthly and 3 weekly, we are more on track. Do you backup most of the packages or only a few? Is the server on your local network (NAS, home server, Workstation...) or Internet?

The usual strategies to overcome the compare problem use file time, checksums, hard links or file systems with snapshot capabilities. File time is kind of unreliable especially on the target storage, hard links are not available on most backup storages, snapshot file systems (like btrfs) are even more unlikely. All methods are file based, so you basically have a copy of the source file tree on your backup storage.

jochen-01 commented 1 year ago

Transfer time to server is not a issue. I do that one a week by moving the card from the phone to a reader on the h I make backups of all packages.

I tried to sync my wishes with the capabilities of Neo Backup. ;-) But without differential backups it's not easy. In an ideal world I would make

Notice that they are overlapping a bit -- just in case of delays in doing host backups.

For quick restore tasks I have the recent backups on the phone. For longer steps into the past I have snapshot backups for a whole year on the host.

powerman commented 10 months ago

@hg42 Any plans/progress on this?

My use case is similar: with Titanium Backup I get used to daily backups uploaded to Dropbox. It was very convenient because backup was done only for changed apps, and as most apps won't used/updated (and thus change) every day daily addition to backup was small enough to make it convenient to upload it to Dropbox every day. Also it was very convenient to have 3 last apk versions in backup for unused apps (because unused apps "change" only when they updated) - because sometimes updates result in a broken app, and for apps which are not used every day it's hard to notice this fact, so ability to restore 2 previous apk versions from backup (when you occasionally notice broken app) was really invaluable!

After switch to NeoBackup user experience has changed:

If NeoBackup will skip creating new backup in case there is no changes compared to previous backup this will solve all these issues!