forked from danrue/feather
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
86 lines (75 loc) · 2.39 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
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