backup
backup copied to clipboard
Fix/Implement Backup Purge
This pull request implement a functional purge process that doesn't orphan incremental without a parent full. This is to address the issues #177 and #163.
In order not to change the UI, the logic will retain the same number of fulls and incrementals. For example if Policy for the local app data is set to 3, then up to three fulls and up to three incremental children of each full parent will be kept. If a full is being expired, then all children will be deleted as well.
Note: This code does not fix the problem of external storage being purged. I couldn't find an available function to list the external points similar to getLocalRestoringPoints() and the logic for external storage I don't quite understand yet.
I've committed that should work for the Archive flag. I'm having testing problems because my backup app is littered with hand-fixed code to try to work on three issues simultaneously. Another tester would be nice.
Fixed the sign-off comments (always forget that) and fixed my local environment. Tests clean.
Any chance of moving this along? I see that a Backup 1.0.6 came out. That was unfortunately installed when I did the latest point release of Nextcloud itself and now my backups are broken again.