-
Notifications
You must be signed in to change notification settings - Fork 6
/
zelta.conf
160 lines (133 loc) · 5.98 KB
/
zelta.conf
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# Zelta Policy Backup Configuration
#
# When "zelta policy " is called with with no options, a backup batch job is called using this
# configuration file, which contains behavior options, backup sources and targets, and other
# miscellaneous options. Note that zelta's global defaults, such as the snapshot naming format,
# must be configured with environment variables or in zelta.env.
#
# See below for examples and details about each option with the default option below each
# "Example:" line. For more information, see the README.md and wiki here:
#
# https://github.com/bellhyve/zelta
#
# This file is not feature-complete YAML and context-dependent options are interpreted in
# order. For example, site-specific options must appear before the host definitions. Also note
# that command line options will override ALL contexts.
### Global Options
# # Set a default backup target for source volumes with no specified target. For example,
# # a source defined as " - source/vol" will be replicated to "BACKUP_ROOT/vol".
# # Example: BACKUP_ROOT: tank/Backups
# BACKUP_ROOT:
# # If SNAPSHOT is set to:
# # WRITTEN (Default) Snapshot the source only if necessary (new data written).
# # ALL Always snapshot the source.
# # SKIP If a snapshot isn't necessary, skip replication entirely.
# # OFF (Or 0) Do not snapshot.
# # WARNING: This is NOT a replacement for a local snapshot policy!
# # Snapshot naming format is an eval of the environemnt variable ZELTA_SNAP_NAME. See
# # the default zelta.env for more information.
# # Example: SNAPSHOT: SKIP
# SNAPSHOT: WRITTEN
# # If set to 1 or more, attempt to retry failed replications. We most commonly use a value of
# # "RETRY: 2" to recover from everyday network interruptions.
# # Example: RETRY: 1
# RETRY: 0
# # If set to 0, skip intermediate snapshots and only replicate the latest possible snapshot. If
# # set to the default value of 1, replicate as much as possible.
# # Example: INTERMEDIATE: 0
# INTERMEDIATE: 1
# # If on, pass the "zfs send -R" flag which downloads past snapshots recursively up to the latest
# # match. If snapshots are always made with "zfs snapshot -r", "REPLICATE: 1" in conjunction with
# # "DEPTH: 1" will be more efficient by skipping recursive listings. INTERMEDIATE tends to be safer.
# # Example: REPLICATE: 1
# REPLICATE: 0
# # Restrict the "zfs list" depth to this many levels. If used without REPLICATE, Zelta will produce more
# # shallow replications, e.g., if given "DEPTH: 2" and the target has the children "one/two/three", only
# # "one/two" will be replicated.
# # Example: DEPTH: 3
# DEPTH: 0
# # Add this many elements up to the pool name underneath BACKUP_ROOT. For example, if given
# # "PREFIX: 99" and source volume "one/two/three", the target will be: BACKUP_ROOT/one/two/three
# # Example: PREFIX: 99
# PREFIX: 0
# # Add the hostname as an element after BACKUP_ROOT, e.g., "BACKUP_ROOT/myhost/zroot". This setting
# # is recommended for configurations without unique volume names.
# # Example: HOST_PREFIX: 1
# HOST_PREFIX: 0
# # Replicate sources to the following host via SSH rather than a local pool.
# # Example: PUSH_TO: backup.host
# PUSH_TO:
# # By default, or if only one Site has been defined, Zelta runs one replication job at a time. If
# # THREADS is set to 2 or more and multiple Sites are defined, Zelta will replicate from that many
# # Sites at a time. In the example below with "THREADS: 2", the hosts on DEFAULT_SITE and SITE_TWO
# # will replicate simultaneously.
# # Example: THREADS: 2
# THREADS: 0
# # Rather than providing a simple output log, print more detailed JSON output. This is useful for
# # graphing backup history.
# # Example: JSON: 1
# JSON: 0
### SITE, HOST, AND DATASET DEFINITIONS
#
# Note: There are no default site, host, or dataset definitions. Examples are provided below.
# # Sites are top-level elements used for multi-threading replication jobs or for organizing this
# # file. Consider creating a Site for each physical location
#
# DEFAULT_SITE:
# # # A hostname (or IP) containing source volumes must be indended two spaces. Hosts are connected
# # # to via SSH.
#
# host1.mynet:
# # # For each host, one or more backup source volumes must be listed. By default, the volume will
# # # be replicated to BACKUP_ROOT as described above. The volume must be indented with in YAML style
# # # with two spaces, a dash, and a space: - source/vol/name
#
# - pool/vm/netbsd
# # # A target can be specified for a source dataset with a colon. This overrides any element-related
# # # options above.
#
# - pool2/jail/linux: tank/jail/linux
# # # Use a hostname of "localhost" to replicate from a local source volume.
#
# localhost:
# # # You can also define a remote target with a [user@]host: prefix. The following could be used
# # # to send a local VM to a warm failover host:
#
# - tank/vm/alpine: kvm@remote.host:pool/vm/alpine
# # # OVERRIDES
# # # You can override global options for individual Sites by adding the option and value with the same
# # # indentation as a host. The context is understood because options have a value on the same line,
# # # and hosts do not. Options must appear before host definitions.
#
# Site_One:
# HOST_PREFIX: 1
# BACKUP_ROOT: back/up/here/instead
# my.host1:
# - vol1
# - vol2
# # # To override global and site options in the host context, an "options:" and "datasets:" sub-option
# # # can be given. Datasets must continue to be given in list form (prefixed with a "-"). Override
# # # "options:" must be provided before "datasets:".
#
# Site_Two:
# my.host2:
# options:
# HOST_PREFIX: 1
# PREFIX: 1
# REPLICATE: 1
# DEPTH: 1
# datasets:
# - zroot/vm
# - zroot/jail
# - zroot/ROOT/default
# # Here's another example site definition with multiple hosts, source volumes, and targets.
#
# SITE_THREE:
# host3.othernet:
# - zroot: tank/Backups/host3
# host4.othernet:
# - pool/jail/inst1
# - pool/jail/inst2
# - pool/jail/inst3
# host5.othernet:
# - pool/vm/proxy: failover.box:tank/vm/proxy