zrepl/cmd/sampleconf/zrepl.yml

112 lines
2.4 KiB
YAML
Raw Normal View History

remotes:
offsite_backups:
transport:
ssh:
host: 192.168.122.6
user: root
port: 22
identity_file: /etc/zrepl/identities/offsite_backups
2017-04-26 18:36:01 +02:00
2017-09-02 12:24:17 +02:00
push:
offsite:
to: offsite_backups
filter: {
# like in pull_acls
"tank/var/db<": ok,
"tank/usr/home<": ok,
}
2017-04-26 18:36:01 +02:00
2017-09-02 12:24:17 +02:00
pull:
offsite:
from: offsite_backups
2017-04-26 18:36:01 +02:00
mapping: {
# like in sinks
}
# local replication, only allowed in pull mode
# the from name 'local' is reserved for this purpose
homemirror:
from: local
repeat:
interval: 15m
mapping: {
"tank/usr/home":"mirrorpool/foo/bar"
}
2017-09-02 12:24:17 +02:00
sink:
2017-04-26 18:36:01 +02:00
db1:
2017-04-26 18:36:01 +02:00
mapping: {
# direct mapping
2017-04-26 18:36:01 +02:00
"ssdpool/var/db/postgresql9.6":"zroot/backups/db1/pg_data"
}
mirror1:
2017-04-26 18:36:01 +02:00
mapping: {
# "<" 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
}
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: {
"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-09-02 12:24:17 +02:00
pull_acl:
office_backup:
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-06-22 19:04:48 +02:00
prune:
clean_backups:
2017-06-22 19:04:48 +02:00
policy: grid
grid: 6x10m | 24x1h | 7x1d | 5 x 1w | 4 x 5w
2017-06-22 19:04:48 +02:00
dataset_filter: {
"tank/backups/legacyscript<": omit,
"tank/backups<": ok,
2017-06-22 19:04:48 +02:00
}
snapshot_filter: {
prefix: zrepl_
}
hfbak_prune: # cleans up after hfbak autosnap job
policy: grid
grid: 1x1m(keep=all)
dataset_filter: {
"pool1<": ok
}
snapshot_filter: {
prefix: zrepl_hfbak_
}
2017-09-01 16:45:43 +02:00
repeat:
interval: 10s
autosnap:
hfbak:
prefix: zrepl_hfbak_
interval: 1s
dataset_filter: {
"pool1<": ok
}
# 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)