dsnap-sync: introduce snapper config-types and config-postix

o snapper config-types
  enhance snapper config template which new fields
  CHILD_CONFIG=<true | false>  default: missing -> means false
  PARENT_CONFIG=<parent config name>
o Use the types for distinctable snapshot runs:
  disk2disk (1st stage snapshots  CHILD_CONFIG='false' or missing
  cloning   (2st stage snapshots  CHILD_CONFIG='true' or missing
o snapper config postfix
  to overcome snapper config name clashes, enable dsnap-sync with
  selectable postfix (default: .<hostname>)
  cloning a "home" config to remote host will not interfere with
  a "home" d2d-config on this remote host
o update the snapper template dsnap-sync
This commit is contained in:
2018-06-05 11:27:10 +02:00
parent 36bcc7877e
commit d93a11ab70
2 changed files with 127 additions and 1 deletions

View File

@@ -0,0 +1,61 @@
###
# snapper template for dsnap-sync handling
###
# subvolume to snapshot
SUBVOLUME="/var/lib/dsnap-sync"
# filesystem type
FSTYPE="btrfs"
# users and groups allowed to work with config
ALLOW_USERS=""
ALLOW_GROUPS="adm"
# sync users and groups from ALLOW_USERS and ALLOW_GROUPS to .snapshots
# directory
SYNC_ACL="yes"
# start comparing pre- and post-snapshot in background after creating
# post-snapshot
BACKGROUND_COMPARISON="yes"
# run daily number cleanup
NUMBER_CLEANUP="no"
# limit for number cleanup
NUMBER_MIN_AGE="1800"
NUMBER_LIMIT="50"
NUMBER_LIMIT_IMPORTANT="10"
# "no": we will use systemd.timer
TIMELINE_CREATE="no"
# create cron based cleanup entries
# "no": we will use systemd.timer
TIMELINE_CLEANUP="no"
# snap-sync: timeline settings
TIMELINE_MIN_AGE="1800"
TIMELINE_LIMIT_HOURLY="1"
TIMELINE_LIMIT_DAILY="2"
TIMELINE_LIMIT_MONTHLY="1"
TIMELINE_LIMIT_YEARLY="1"
# cleanup empty pre-post-pairs
EMPTY_PRE_POST_CLEANUP="yes"
# limits for empty pre-post-pair cleanup
EMPTY_PRE_POST_MIN_AGE="1800"
# uncomment to exclude this subvol when calling
# snap-sync as timer unit
# SNAP_SUNC_EXCLUDE="yes"
# uncomment if your config will be used as snapshot-clone
#CHILD_CONFIG=true
#PARENT_CONFIG=<parent config name>