2017-07-08 12:07:38 +02:00
|
|
|
remotes:
|
2017-07-06 15:36:53 +02:00
|
|
|
offsite_backups:
|
2017-04-29 20:10:09 +02:00
|
|
|
transport:
|
|
|
|
ssh:
|
2017-04-30 17:55:11 +02:00
|
|
|
host: 192.168.122.6
|
2017-04-29 20:10:09 +02:00
|
|
|
user: root
|
|
|
|
port: 22
|
2017-04-30 17:55:11 +02:00
|
|
|
identity_file: /etc/zrepl/identities/offsite_backups
|
2017-04-26 18:36:01 +02:00
|
|
|
|
2017-09-02 12:24:17 +02:00
|
|
|
push:
|
2017-07-06 15:36:53 +02:00
|
|
|
|
|
|
|
offsite:
|
|
|
|
to: offsite_backups
|
2017-05-16 16:57:24 +02:00
|
|
|
filter: {
|
2017-08-05 21:15:37 +02:00
|
|
|
# like in pull_acls
|
|
|
|
"tank/var/db<": ok,
|
|
|
|
"tank/usr/home<": ok,
|
2017-05-16 16:57:24 +02:00
|
|
|
}
|
2017-04-26 18:36:01 +02:00
|
|
|
|
2017-09-02 12:24:17 +02:00
|
|
|
pull:
|
2017-07-06 15:36:53 +02:00
|
|
|
|
|
|
|
offsite:
|
|
|
|
from: offsite_backups
|
2017-04-26 18:36:01 +02:00
|
|
|
mapping: {
|
|
|
|
# like in sinks
|
|
|
|
}
|
|
|
|
|
2017-04-30 17:55:11 +02:00
|
|
|
# local replication, only allowed in pull mode
|
|
|
|
# the from name 'local' is reserved for this purpose
|
2017-07-06 15:36:53 +02:00
|
|
|
homemirror:
|
|
|
|
from: local
|
2017-06-09 21:00:28 +02:00
|
|
|
repeat:
|
|
|
|
interval: 15m
|
2017-04-29 20:10:09 +02:00
|
|
|
mapping: {
|
|
|
|
"tank/usr/home":"mirrorpool/foo/bar"
|
|
|
|
}
|
|
|
|
|
2017-09-02 12:24:17 +02:00
|
|
|
sink:
|
2017-04-26 18:36:01 +02:00
|
|
|
|
2017-07-06 15:36:53 +02:00
|
|
|
db1:
|
2017-04-26 18:36:01 +02:00
|
|
|
mapping: {
|
2017-08-05 21:15:37 +02:00
|
|
|
# direct mapping
|
2017-04-26 18:36:01 +02:00
|
|
|
"ssdpool/var/db/postgresql9.6":"zroot/backups/db1/pg_data"
|
|
|
|
}
|
|
|
|
|
2017-08-05 21:15:37 +02:00
|
|
|
mirror1:
|
2017-04-26 18:36:01 +02:00
|
|
|
mapping: {
|
2017-08-05 21:15:37 +02:00
|
|
|
# "<" subtree wildcard matches the dataset left of < and all its children
|
|
|
|
"tank/foo/bar<":"zroot/backups/mirror1"
|
2017-04-26 18:36:01 +02:00
|
|
|
}
|
|
|
|
|
2017-08-05 21:15:37 +02:00
|
|
|
mirror2:
|
|
|
|
# more specific path patterns win over less specific ones
|
|
|
|
# direct mappings win over subtree wildcards
|
|
|
|
# detailed rule precedence: check unit tests & docs for exact behavior
|
|
|
|
# TODO subcommand to test a mapping & filter
|
2017-04-26 18:36:01 +02:00
|
|
|
mapping: {
|
2017-08-05 21:15:37 +02:00
|
|
|
"tank<": "zroot/backups/mirror1/tank1",
|
|
|
|
"tank/cdn/root<": "storage/cdn/root",
|
|
|
|
"tank/legacydb": "legacypool/backups/legacydb",
|
2017-04-26 18:36:01 +02:00
|
|
|
}
|
|
|
|
|
2017-04-30 17:55:11 +02:00
|
|
|
|
2017-09-02 12:24:17 +02:00
|
|
|
pull_acl:
|
2017-07-06 15:36:53 +02:00
|
|
|
|
|
|
|
office_backup:
|
2017-08-05 21:15:37 +02:00
|
|
|
filter: {
|
|
|
|
# valid filter results (right hand side): ok, omit
|
|
|
|
# default is to omit
|
|
|
|
# rule precedence is same as for mappings
|
|
|
|
"tank<": omit,
|
|
|
|
"tank/usr/home": ok,
|
2017-04-30 17:55:11 +02:00
|
|
|
}
|
2017-06-22 19:04:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
prune:
|
|
|
|
|
2017-07-06 15:36:53 +02:00
|
|
|
clean_backups:
|
2017-06-22 19:04:48 +02:00
|
|
|
policy: grid
|
2017-07-09 00:38:16 +02:00
|
|
|
grid: 6x10m | 24x1h | 7x1d | 5 x 1w | 4 x 5w
|
2017-06-22 19:04:48 +02:00
|
|
|
dataset_filter: {
|
2017-08-05 21:15:37 +02:00
|
|
|
"tank/backups/legacyscript<": omit,
|
|
|
|
"tank/backups<": ok,
|
2017-06-22 19:04:48 +02:00
|
|
|
}
|
|
|
|
snapshot_filter: {
|
|
|
|
prefix: zrepl_
|
|
|
|
}
|
2017-07-01 20:28:46 +02:00
|
|
|
|
2017-07-06 15:36:53 +02:00
|
|
|
hfbak_prune: # cleans up after hfbak autosnap job
|
2017-07-01 20:28:46 +02:00
|
|
|
policy: grid
|
2017-07-09 00:38:16 +02:00
|
|
|
grid: 1x1m(keep=all)
|
2017-07-01 20:28:46 +02:00
|
|
|
dataset_filter: {
|
2017-08-05 21:15:37 +02:00
|
|
|
"pool1<": ok
|
2017-07-01 20:28:46 +02:00
|
|
|
}
|
|
|
|
snapshot_filter: {
|
|
|
|
prefix: zrepl_hfbak_
|
|
|
|
}
|
2017-09-01 16:45:43 +02:00
|
|
|
repeat:
|
|
|
|
interval: 10s
|
2017-07-01 20:28:46 +02:00
|
|
|
|
|
|
|
autosnap:
|
|
|
|
|
2017-07-06 15:36:53 +02:00
|
|
|
hfbak:
|
2017-07-01 20:28:46 +02:00
|
|
|
prefix: zrepl_hfbak_
|
|
|
|
interval: 1s
|
|
|
|
dataset_filter: {
|
2017-08-05 21:15:37 +02:00
|
|
|
"pool1<": ok
|
2017-07-01 20:28:46 +02:00
|
|
|
}
|
|
|
|
# prune: hfbak_prune
|
|
|
|
# future versions may inline the retention policy here, but for now,
|
|
|
|
# pruning has to be triggered manually (it's safe to run autosnap + prune in parallel)
|