nextcloud / nextcloud/backup

Purge Backup Points not considering Parents and Childs

Open
#177 3 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
272
Forks
37
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in lib/Service/PointService.php around lines 954-969 and trace how purge candidates and backup-point dependencies are selected. The fix is done when purging an old full backup no longer leaves dependent differential backups unusable because their parent backup set was removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.