-
Notifications
You must be signed in to change notification settings - Fork 104
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
Suggestion: Mark a specific archive as "never prune" #146
Comments
+1 for this. My use-case is that I want to move old backups into attic and make sure that (some of) those archives aren't pruned. |
I think that the --prefix flag does a decent job of dealing with this use case. However, when relying on the archive name like this, it would be nice to have a rename archive command. |
A rename command for an attic archive would definitely be useful and probably a very good way to achieve this. However, right now the --prefix command only lets you specify what archives to include in the pruning. So if you have a list of archives that start with a non-static string, i.e.starting with the year: 20141201-1021 Mon Dec 1 16:51:23 2014 And you rename one of the archives to be "never-prune-20141209-1330", there is no easy way to tell attic which archives to prune. So "attic prune" would need a --prefix-exclude option added, or better both a --prefix-exclude and a -suffix-exclude. Because I'd rather rename a "never prune this" archive as "20141209-1330-do-not-prune". Another argument for adding a "never prune" flag is that it is harder to get wrong if someone does an "attic prune" but forgets to use the --prefix or --suffix correctly. With the "never prune" flag or "never prune before" value set on an archive, you don't have to worry that someone goofing up the attic prune command will wipe out the archive that you have set aside for safe keeping. Thinking about this a bit more, it would make sense to add a comment at the time of setting the "never prune" flag. attic create --never-prune-before 5y --never-prune-comment "This archive must be kept for five years due to XYZ regulation" (path-to-repository) (files-to-backup) |
The docs currently suggest a prefix title for naming (eg If you run attic prune or attic delete incorrectly you are already in a world of hurt. I'd suggest backing up your attic repo. And possibly attic should require user confirmation when running these commands -- with a I love attic's simplicity, so I'm against adding too many new flags or moving prune logic to a completely different command (ie create). As for dealing with your naming scheme, the prune command could have a single Actually, on the topic of a rename command it might make more sense to have a copy command, which would just add an archive that points to the same blocks. The old archive could then be deleted if desired. But I'm not sure about implementation details at this time. I would be very interested to hear some of the main devs' views on the suggestions in this thread. |
Simplicity is indeed a good goal, but for backup software I desire a few things:
If the solution to a problem with the backup repository is to "restore it from backup" in the case of a minor issue that could have been avoided, then Attic is not living up to its billing as backup software. |
See PR #251 for archive rename. I think the PR also fixes this issue as you can rename your never-prune archives so that they do not match prune --prefix any more (e.g. noprune-*). If all your regular archive names start with the year, you could use prune --prefix 20 and be ok until 2099. :) |
Right now you have the "attic prune" command for automatic pruning of old revisions (kudos for a very well thought out command) as well as "attic delete".
I would like to see a "never prune" flag added to an individual archive. Maybe I have an archive that I want to keep around forever, even if pruning is applied to the attic repository. Any archive with the "never prune" flag would simply not be a candidate for pruning nor would it be included in the pruning algorithm.
I'd want to be able to specify this at two points in time:
An expanded version of the concept would be "--never-prune-earlier-than DATE". Once that date has passed, the archive becomes eligible for pruning with "attic prune".
The text was updated successfully, but these errors were encountered: