Coder Social home page Coder Social logo

snaprotate's Introduction

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.

snaprotate's People

Contributors

benclifford avatar

Watchers

 avatar  avatar  avatar

snaprotate's Issues

ambiguous

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)


snaprotate hard-codes "name of snapshot" policy

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 ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.