Git Product home page Git Product logo

feather's Introduction

Feather is a tarsnap script written in python that performs and maintains a set
of backups as defined by a yaml configuration file.  

Features: 
 - Dynamic scheduling
 - Keep an arbitrary number of backups of each schedule type
 - Restrict schedules based on time of day
 - Restrict feather run to a certain amount of wall time (max_runtime)
 - Multiple backup paths per tarsnap 
 - Multiple exclude list per tarsnap

Feather is designed to be run from cron like this:

 */5 * * * * /usr/local/bin/feather /usr/local/etc/feather.yaml 

The best way to understand feather is to read an example configuration file:


# Global paths, if different from default
cachedir: /usr/home/drue/tarsnap/cachedir
keyfile: /usr/home/drue/tarsnap/tarsnap.key
binpath: /usr/local/bin/

# perform a checkpoint every checkpoint_bytes, don't cross filesystems
backup_args: "--one-file-system --checkpoint-bytes 104857600"

# Kill the script after N seconds.
max_runtime: 3600

# Define the schedule
#
# period: Seconds.  A backup is taken every period.
# always_keep: Number of backups to keep of a particular period, before 
#              pruning old backups.  Backups younger than now()-period are
#              never removed.
# implies:  Include another defined schedule.  i.e. if WEEKLY implies
#           MONTHLY, and you ask for WEEKLY backups, you will get WEEKLY 
#           and MONTHLY.
# before/after: Restrict running to a certain time of day (UTC)
#
schedule:
  - monthly:
    - period: 2592000 # 30 days
    - always_keep: 12
    - before: "0600"
  - weekly:
    - period: 604800 # 7 days
    - always_keep: 6
    - after: "0200"
    - before: "0600"
    - implies: monthly
  - daily:
    - period: 86400 # 1 day
    - always_keep: 14
    - after: "0200"
    - before: "0600"
    - implies: weekly
  - hourly:
    - period: 3600
    - always_keep: 24
    - implies: daily
  - realtime:
    - period: 900
    - always_keep: 10
    - implies: hourly

# Define individual backups
# Path can be a directory or a file.
# Path can be a list or a single item.
backups:
  - _usr_local:
    - schedule: daily
    - path: /usr/local
    - exclude: /usr/local/bin
  - _etc:
    - schedule: realtime
    - path: /etc
  - music:
    - schedule: monthly
    - path: 
      - /home/joe/music
      - /home/bob/music
    - exclude:
      - /home/joe/music/bieber # Not paying to back this up
      - /home/bob/music/backstreet_boys #not paying to store this either

feather's People

Contributors

alives avatar danrue avatar dferris93 avatar greenskeleton avatar pjv avatar

Watchers

 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.