-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswiftbackup.conf
More file actions
116 lines (97 loc) · 3.21 KB
/
swiftbackup.conf
File metadata and controls
116 lines (97 loc) · 3.21 KB
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
[defaults]
# This section contains the default values that apply to all targets defined
# in this file. To change a setting on a per-target level, override the option
# in the target's section. To change a global default, uncomment and change
# the option here.
# Retention settings
# How many hourly, daily, weekly, monthly, yearly snapshots to retain
#retain_hourly = 6
#retain_daily = 7
#retain_weekly = 4
#retain_monthly = 6
#retain_yearly = 0
# Rsync settings
# Path to rsync
#rsync_bin = /usr/bin/rsync
# Default options for rsync
#rsync_defaults = -ax --delete --delete-excluded --numeric-ids --relative
# Additional options for rsync. These should be empty here so they can be
# used to add options on a per-target basis.
#rsync_options =
# Default rsync excludes. Shortcut for adding multiple --exclude options.
#rsync_exclude = lost+found/ .gvfs/
# Misc settings
# Command to used to ping a host if ping is requested
#ping_cmd = /bin/ping -w1 -c1
# The strftime format string used for creating human-readable symlinks to
# snapshots
#link_fmt = %Y-%m-%d.%H%M
# Directory where snapshots are stored
#backup_directory = /srv/swiftbackup
#
# Backup targets
#
# A config file section not named 'defaults' describes a backup target.
# Additional options that can be used in target sections:
#
# backup - Required. Specify one or more sources to back up. When multiple
# sources are used, put each on its own line.
#
# backup =
# <backup line>
# ...
#
# Format of a backup line:
# <source> [<destination>] [<rsync_option>...]
#
# source - The source to connect to, in a format accepted by rsync.
# destination - Relative path within the snapshot to sync to, instead of the
# root of the snapshot directory.
# rsync_option - All fields beginning with '-' are appended to the rsync
# options when backing up this source.
#
# ping - Optional. Use ping_cmd to ping each host in the list to check if
# it is up. If any host is not up, the backup will be skipped and no error code
# will be returned.
#
# ping = <hostname or IP>...
#
# Examples
#
# Backup /home and /etc on example.net using ssh, connecting as root.
# Note that this requires that the two backups do not share any path names, and
# that rsync is called with the --relative option (see rsync_defaults above).
# Otherwise the second transfer would delete or overwrite the files copied
# there by the first one.
[example.net]
backup =
root@example.net:/home
root@example.net:/etc
# Backup from an rsync server, with custom retention settings
[video]
retain_hourly = 1
retain_daily = 0
retain_weekly = 0
retain_monthly = 3
retain_yearly = 0
backup =
mediacenter::video
# Opportunistic backup of a host that might not always be connected
[laptop]
ping = 192.168.0.42
rsync_exclude = .cache/
rsync_options = --rsh='ssh -4'
backup =
root@laptop:/home
# Backup logs of multiple hosts to separate directories in a single snapshot
[www-logs]
backup =
www1.example.net:/var/log/ www1/
www2.example.net:/var/log/ www2/
www3.example.net:/var/log/ www3/
# Backup using rsync daemon mode over SSH
# For the required setup on the remote side, see
# https://gist.github.com/trendels/6582e95012f6c7fc6542
[example.com]
backup =
example.com::backup --rsh=ssh