Giter VIP home page Giter VIP logo

tarsnap-cron's Introduction

tarsnap-cron

Cron scripts (bash/shell) for tarsnap backup, including scheduled deletion of old backups.

Description

tarsnap is a very useful backup service, with lots of features, which I won't go into here. It allows separate roles, so you could have servers that cannot delete their own backups, even if they're hacked.

These scripts attempt to make it easier for scheduled backups, with scheduled deletion of old backups. It lets you keep X daily backups, Y weekly backups and Z monthly backups, you can.

Archiving and pruning can be run on different systems. The default weekly backups are on Mondays, and monthly backups are on the first.

This is based on work by Tim Bishop.

Changes from the original

I'm writing and testing this on Linux systems. It may work on FreeBSD, or not. You can try it, or just try Bishop's code.

Note: I modified the format of the archive names.

  • an example from Bishop's script - 20140201-010100-monthly-/var/www
  • an example from my script - hostname-www-2014-02-01-0101-monthly

I changed it to incorporate backups from a previous system of my design. The systems to prune old backups are incompatible, so if you switch between this script and his, old backups will stick around longer than they should. It would probably take manual cleanup to fix.

I think this version is more extendible. Instead of reinventing cron, it simply uses a customized crontab. Hourly and yearly backups wouldn't be hard to implement, if there's any demand.

tarsnap-cron's People

Contributors

pronoiac avatar crash avatar

Watchers

James Cloos avatar  avatar

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.