-
Notifications
You must be signed in to change notification settings - Fork 42
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
prune
command
#176
Comments
I'm open for having such thing integrated directly, but why does it have to use a naming scheme? The creation date etc. could be stored in the name file itself, along with any tags like "weekly" "monthly" etc. I need to double check what we store there already... haven't been paying attention to this project for a long while. |
The current naming scheme "restriction" is due to the fact I don't believe the metadata currently contains the timestamp (but maybe I overlooked it?). So, agreed, if that metadata were (or is) included, that would be the superior way to do it (although I already name my archives this way, so the restriction isn't a problem for me personally). I did intentionally avoid e.g. checking creation timestamps on the names |
Please add any metadata you want that is missing (date mostly?), while backfilling date during deserializatoin with filesystem creation/modification date (for backward-compat), and also maybe tags while at it? https://github.com/dpc/rdedup/blob/master/lib/src/name.rs |
If i get it right, we need the naming scheme for backups (correct me if one of the assumptions is wrong):
So +1 for merging the prune command. |
That would mean that a prune command must read each and every name file, instead of just doing a |
Doesn't seem terrible, especially that the job of prune is to keep the number of of things limited. |
For my usage, reading the metadata for each name is fine (isn't costly), but it does seem some cases that might actually be undesirable. The existing behavior of the Or, by default the command would consult the metadata (as I personally think this is more "reliable"), but there would be a flag |
I have (just) published a crate rdedup-prune which implements a
prune
command following the semantics of attic's prune, which I use to maintain my archives. It relies on a specific naming scheme,<prefix>-<timestamp>
, for example "foo-2020-08-04-16-23-00'. It will simply ignore (not remove) names that do not match the format.This is built on
rdedup-lib
, and would be easy to integrate directly intordedup
. It's fine as a stand alone tool, and I think would only benefit from directly integrating if timestamp metadata were added as part of the repository format. This would allow pruning without a specificname
format. The external implementation meets my need, however.The text was updated successfully, but these errors were encountered: