backup
backup copied to clipboard
Purge Backup Points not considering Parents and Childs
The purge of Backup Points is not considering the dependency for Child Backup Points (Differential Backup), so for if the Full Backup get purged because it's the oldest and then number of Backup Points existing are above define limit for purge, the depending Child Backups getting useless as the parent backup set is lost!!
https://github.com/nextcloud/backup/blob/069fe25958b00d1e02f29ed69294f7281a163af3/lib/Service/PointService.php#L954-L969
I think the purge has to be coded more specific, to not break the dependency chain of the backup points.
This might be causing what I'm experiencing in #163
This is definitely the root cause of #163. This issue can case loss of backup data.
Pull request #183 addresses this. From jxmx/backup one can copy PointService.php to the webroot app/backup/lib/service folder and then run an 'occ backup:point:purge' and have it work correctly. Note that orphans cannot be fixed and need to be deleted by hand with 'occ backup:point:delete'.