Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature to "pin" or "protect" backup (prevent from automatic deleting by the keep setting) #903

Open
anhtbnlpq9 opened this issue Mar 26, 2022 · 3 comments

Comments

@anhtbnlpq9
Copy link

Hello,

I did not find an issue about that here and did no find the feature in the documentation.

Using a keep feature, would it be possible to have a feature that will pin a backup (using its id), so that it would never be automatically deleted by the keep algorithm?
This would be implemented in the client configuration file (server-side), like a or several "keepid" variables specifying which backups to ignore from the keep algo (and never delete then).

I have this situation:

  • I have been backuping a server and then I had to reinstall it (with format, etc), so now it is empty
  • I would like not to restore everything yet and sort things inside the backup
  • but I would also like to continue backup the server after the reinstall (backup which will be very different from the last one before reinstallation)
  • I use a keep scheme 7/4/24

If I continue the backup, the last "complete" backup would eventually be deleted.

At the moment I am not doing backup anymore, and I don't know, without the feature, how I could "protect" the files (maybe remove write access to the specific backup folder, but this may affect the keep algorithm somehow).
Restoring the files (and including them in the backup directories) would be the easiest way but if I could avoid that...

Maybe this kind of feature has not its place in a backup software since it is more like an archiving feature.

Thanks

@grke
Copy link
Owner

grke commented Mar 26, 2022

Hello,
This is an interesting idea, thank you, I will look at it.

@xdml
Copy link

xdml commented Nov 17, 2023

I like this idea.

I would rather implement it by using empty file in backup directory instead modifying client configuration, for example file pinned, so if the file exists in the backup directory, deletion will not occur, even if backup is deletable and can be reduced by keep settings.

And instead of touching that file, burp can have an action for it, for example:

# burp -a pin -b 2

to pin backup 2 (create pinned file inside backup 2 directory)

and

# burp -a unpin -b 2

to unpin backup 2 (delete pinned file from backup 2 directory)

and of course, it can be indicated in the list

# burp -a l
Backup: 0000001 2023-11-14 23:31:11 +0100 (deletable)
Backup: 0000002 2023-11-15 23:02:00 +0100 (pinned)
Backup: 0000003 2023-11-16 23:06:02 +0100

@xdml
Copy link

xdml commented Nov 17, 2023

If I understand it correctly, if backup is pinned, than:

If burp is configured with hardlinked_archive=1, than only this backup have to remove BU_DELETABLE flag, so the backup will never be deleted.

If bupr is configured with hardlinked_archive=0, than this backup and all backups it depends on (newer ones, until hardlinked backup) have to remove BU_DELETABLE flag.

Right?

Of course, the above is simplification, I cannot check hardlinked_archive setting, but have to always check, if pinned backup depends on newer ones...

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

No branches or pull requests

3 participants