snaprotate Copyright 2010 Ben Clifford benc@hawaga.org.uk BSD-like licence Deletes old rsync snapshots based on filename-encoded dates and user-specified policy. REQUIRES: ghc BUILDING: make There is no installer at the moment - add $(pwd) to your path. USING: Snapshot directories should all be in the same parent directory, with a name like this: root-2010-03-28-1205+0000 where root is a user-chosen base name, and rest encodes the date. See mksnap for an example. Create a policy file like example.snap (there are more details below). Then, sitting in your snapshot root directory, type: $ /path/to/example.snap --base root This will generate a bunch of debugging info on stderr, and shell commands on stdout - for each directory, there will either be an rm command to remove it, or a shell comment giving the reason for keeping it. You can pipe this into `sh' or `sudo sh' as appropriate.