geoffreywiseman / prune

A simple utility for pruning files based on date as a means of keeping increasingly sparse backups.
http://geoffreywiseman.github.com/prune
The Unlicense
2 stars 0 forks source link

Configurable 'Time' Assessment #40

Closed geoffreywiseman closed 11 years ago

geoffreywiseman commented 12 years ago

Determine which 'time' to use when assessing files might be something that someone wants to change. For instance, you might prefer to parse the time out of the filename rather than relying on mtime/ctime from a Linux filesystem.

This might be overkill for most uses, but I can see some appeal to it in that Linux doesn't store a file creation time, so if you modify a file, this will throw off your prune rules.

geoffreywiseman commented 11 years ago

If you write your own retention policy this is already basically done -- you can use your own criteria for matching and taking actions.

It's worth adding a test to assess that a different criterion can be used -- filename date, size, etc, but that should already work and then this can be closed.