mirror of
https://github.com/zrepl/zrepl.git
synced 2024-11-26 02:14:44 +01:00
70258fbada
configbreak
112 lines
2.4 KiB
YAML
112 lines
2.4 KiB
YAML
remotes:
|
|
offsite_backups:
|
|
transport:
|
|
ssh:
|
|
host: 192.168.122.6
|
|
user: root
|
|
port: 22
|
|
identity_file: /etc/zrepl/identities/offsite_backups
|
|
|
|
push:
|
|
|
|
offsite:
|
|
to: offsite_backups
|
|
filter: {
|
|
# like in pull_acls
|
|
"tank/var/db<": ok,
|
|
"tank/usr/home<": ok,
|
|
}
|
|
|
|
pull:
|
|
|
|
offsite:
|
|
from: offsite_backups
|
|
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"
|
|
}
|
|
|
|
sink:
|
|
|
|
db1:
|
|
mapping: {
|
|
# direct mapping
|
|
"ssdpool/var/db/postgresql9.6":"zroot/backups/db1/pg_data"
|
|
}
|
|
|
|
mirror1:
|
|
mapping: {
|
|
# "<" subtree wildcard matches the dataset left of < and all its children
|
|
"tank/foo/bar<":"zroot/backups/mirror1"
|
|
}
|
|
|
|
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
|
|
mapping: {
|
|
"tank<": "zroot/backups/mirror1/tank1",
|
|
"tank/cdn/root<": "storage/cdn/root",
|
|
"tank/legacydb": "legacypool/backups/legacydb",
|
|
}
|
|
|
|
|
|
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,
|
|
}
|
|
|
|
|
|
prune:
|
|
|
|
clean_backups:
|
|
policy: grid
|
|
grid: 6x10m | 24x1h | 7x1d | 5 x 1w | 4 x 5w
|
|
dataset_filter: {
|
|
"tank/backups/legacyscript<": omit,
|
|
"tank/backups<": ok,
|
|
}
|
|
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_
|
|
}
|
|
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)
|