benclifford / snaprotate Goto Github PK
View Code? Open in Web Editor NEWlanguage for specifying backup retention policies
Home Page: http://www.hawaga.org.uk/ben/tech/snaprotate/
language for specifying backup retention policies
Home Page: http://www.hawaga.org.uk/ben/tech/snaprotate/
snaprotate Copyright 2010 Ben Clifford [email protected] 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.
in the worst case, everything recent can go away and you end up with either a really old backup or perhaps no backup at all.
me: The Glorious Glasgow Haskell Compilation System, version 7.10.3
snaprotate gives 5 "ambiguous" warnings, each like this:
Ambiguous occurrence ‘<*>’
It could refer to either ‘Prelude.<*>’,
imported from ‘Prelude’ at /tmp/snaprotatepeskU.hs:1:1
(and originally defined in ‘GHC.Base’)
or ‘SnapRotate.<*>’,
imported from ‘SnapRotate’ at /tmp/snaprotatepeskU.hs:1:1-17
(and originally defined
at /home/robl/src/snaprotate/SnapRotate.hs:211:3-5)
I use the convention "2013-05-10T09_02_29" for my snapshot directories, but snaprotate assumes the convention "2010-05-09-0405+0000". Adjusting the directory name only requires two edits to SnapRotate.hs, but maybe the naming convention could be captured in the whatever.snap file ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.