NeoApplications / Neo-Backup

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

[Bug] a valid backup can get replaced by an empty 0kb backup when scheduled backup fails to complete #808

Open guitarjorge24 opened 7 months ago

guitarjorge24 commented 7 months ago

Description I have NeoBackup set to keep a max of 2 backup revisions per app. If I lose root due to an OS update, my scheduled daily backup will fail (as expected) and then one my previous valid backups that were made when I still had root access wil get replaced by a new empty backup that is zero bytes (an empty folder).

Steps To Reproduce

  1. Set the max backup revisions to 2
  2. Create 2 backup revisions for an app with a phone that has root access
  3. Create a schedule that makes a daily backup of the app you chose.
  4. Remove root access from the phone
  5. Wait for the daily schedule to run again.
  6. The backup from the daily schedule will fail due to not having root access and one of the 2 valid/working backups will get replaced by an invalid backup (i.e. an empty folder).

Expected behavior If the backup fails, then I would expect it to NOT replace one of my valid backup revisions. Also, the scheduled backup maybe should not even try to run if the phone no longer has root access. Otherwise, I would expect to have an option to not replace backup revisions with a new backup if the newer backup fails to complete.

System Information(please complete the following information):

guitarjorge24 commented 7 months ago

Additional Notes: