Skip to content

Conversation

@jrabinow
Copy link
Contributor

@jrabinow jrabinow commented Nov 5, 2021

Solves #13

This PR changes the naming convention to depend on snapper cleanup policy for the snapshot. If there is any associated cleanup policy, the backup's name will start with snapborg_retentionpolicy_

Only backups whose name start with snapborg_retentionpolicy_ will be pruned, snapborg prune will ignore all others. In case this is undesired, an additional flag --ignore-nameprefix-warning-this-is-permanent exists to apply pruning to all backups in the archive.
This PR also comes with a --noconfirm flag to bypass the confirmation prompt associated with applying pruning to all snapshots.

The reasoning here is that when users manually create snapshots (-> no backup policy), it must be because the system state was of interest. It's therefore worthwhile backing up that snapshot and keeping it indefinitely - or at least until the user manually deletes it.

I'm unsure if this is compatible with your personal use case - would it be better to NOT have this behavior by default, but instead to implement this functionality as an additional field in the snapper userdata that the user can manually specify?

@jrabinow jrabinow force-pushed the dontprune_noautocleanup branch from 2f5b1bc to b755559 Compare November 5, 2021 08:16
@jrabinow jrabinow force-pushed the dontprune_noautocleanup branch from b755559 to eb0cb97 Compare November 5, 2021 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant