From 80e328772bf1f10cb022950850f3c2c78f094df5 Mon Sep 17 00:00:00 2001 From: Ralf Zerres Date: Thu, 14 Mar 2019 09:32:13 +0100 Subject: [PATCH] dsnap-sync: introduce snapper template for dsnap-sync Signed-off-by: Ralf Zerres --- etc/snapper/config-templates/dsnap-sync | 59 +++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 etc/snapper/config-templates/dsnap-sync diff --git a/etc/snapper/config-templates/dsnap-sync b/etc/snapper/config-templates/dsnap-sync new file mode 100644 index 0000000..70ddd65 --- /dev/null +++ b/etc/snapper/config-templates/dsnap-sync @@ -0,0 +1,59 @@ +### +# 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" + +# handele NUMBER_CLEANUP via systemd, if a timer unit is active +NUMBER_CLEANUP="yes" + +# limit for number cleanup +NUMBER_MIN_AGE="1800" +NUMBER_LIMIT="52" +NUMBER_LIMIT_IMPORTANT="12" + +# handle TIMELINE via systemd, if a timer unit is active +TIMELINE_CREATE="no" + +# create a systemd.timer unit to handle TIMELINE cleanup +TIMELINE_CLEANUP="yes" + +# timeline settings +TIMELINE_MIN_AGE="1800" +TIMELINE_LIMIT_HOURLY="1" +TIMELINE_LIMIT_DAILY="14" +TIMELINE_LIMIT_MONTHLY="11" +TIMELINE_LIMIT_YEARLY="2" + +# 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_SYNC_EXCLUDE="yes" + +# Valid CONFIG_TYPE: archive, child, parent +# CONFIG_TYPE="archive" -> if synced, stream snapshot to a non btrfs filesystem +# CONFIG_TYPE="child" -> if synced, stream snapshot to a given CHILD_CONFIG name +CONFIG_TYPE="child" +#CHILD_CONFIG= +#PARENT_CONFIG=