Skip to content
/ feather Public
forked from danrue/feather

Feather is a python script for managing tarsnap backups

Notifications You must be signed in to change notification settings

pjv/feather

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Feather is a python script for managing tarsnap backups

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published