NeoApplications / Neo-Backup

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

[Bug] Backup amount is not followed properly #797

Open HyperCriSiS opened 8 months ago

HyperCriSiS commented 8 months ago

Hi, I have set the maximum amount of backups to two. It works only for some apps, for many other apps there a kept 4,6,10 or even over 30 versions.

Is this a bug or did I configure something wrong?

Thanks and regards Hyper

HyperCriSiS commented 8 months ago

Also many unnecessary backups are made. Very often apps are backed up again completely also there was no change.

HyperCriSiS commented 8 months ago

Screenshot_20231101-221457_MiXplorer

Max backups to keep is set to two.

ovizii commented 8 months ago

I can confirm, I just noticed this problem too with Neo-Backup Version 8.3.4 btw. I am only doing manual backups to local storage.

I have set up revisions to "1"

Screenshot_20231102-155604_Neo Backup

Neo-backup seems to think there is only one revision present:

Screenshot_20231102-155516_Neo Backup

While in reality my file manager shows 4 existing revisions:

Screenshot_20231102-155617_Cx File Explorer

machiav3lli commented 8 months ago

The cause of your issues is having corrupt backups (see the lack of the .proprrties file for most folders).

ovizii commented 8 months ago

Thanks for the pointer, I didn't know each backup had a properties file associated.

I manually checked all my backups and basically only the biggest 3 which are many GB in size had this issue. I vaguely remember the first backups I tried failed but since Neo-backup never showed more than 1 backup for them, it never occurred to me to manually look into the backup folders.

Would it make sense to build a check into Neo-backup which checks the backup folders and logs or notifies about backups with missing properties files?

HyperCriSiS commented 8 months ago

The cause of your issues is having corrupt backups (see the lack of the .proprrties file for most folders).

I have many different combinations. App backups with:

Something is going very wrong. :(

hg42 commented 8 months ago

Would it make sense to build a check into Neo-backup which checks the backup folders and logs or notifies about backups with missing properties files?

actually there is such a feature, but it is still kind of experimental:

then, if you think this is all ok, you can use deleteERROR to remove those renamed items.

Otherwise you may delete what you want manually in the folder (which is easier now, because they are sorted), then use the undoDamagedToERROR, which renames the remaining items back. The marked items are still not picked up by NB, but maybe you want the files for other purposes. Note: encrypted backups (*.enc) cannot be decrypted at all without the propeties file, because it contains a so called "salt" (an additional random key).

hg42 commented 8 months ago
* many folders and only two prop files

this should be the normal case when unexpected things happen. The properties file is only written when the backup was considered successful, so if you or someone else kills NB, NB cannot remove the running backups (usually about 8 in parallel) and the properties files would not be created.

* many folders and same amount of prop files

that's the normal case, but it seems the housekeeping didn't work. This should be a thing of the past... Are you sure you didn't use the lock icons of those superfluous backups? There is one other case that could look like this: if some properties files are empty or damaged.

* two folders and many prop files

now, this is extremely unlikely. It can only happen, if all the backups worked. All commands returned a success code and everything else also worked, only then a properties file is written. Even if the properties fiels are empty or damaged, the fact that NB tried to write them is enough to conclude NB thought the backup was ok.

So, does someone delete folders?

Note, unless restoring, NB is only interested in the properties files. It reads them and if they contain correct infos, those are presented as the backup item.

* many folders and more prop files

I not sure what this one means. Again if there are more properties files than folders, someone deletes folders.

Something is going very wrong. :(

agreed, but what?

HyperCriSiS commented 8 months ago

For now I deleted the whole backup folder. Let's see what happens :)