dsnap-sync: introduce support for automounter

- add parameter to set automounter-path
- handle start of systemd-unit on target
This commit is contained in:
2018-07-13 20:04:27 +02:00
parent 73b28575ef
commit 43cb219fb7

View File

@@ -627,6 +627,10 @@ parse_params () {
# Call usage() function. # Call usage() function.
usage usage
;; ;;
-a|--automount)
automount_path="$2"
shift 2
;;
-b|--backupdir) -b|--backupdir)
backupdir_cmdline="$2" backupdir_cmdline="$2"
shift 2 shift 2
@@ -729,6 +733,10 @@ parse_params () {
printf "%s v%s\n" "$progname" "$version" printf "%s v%s\n" "$progname" "$version"
exit 0 exit 0
;; ;;
--automount=*)
automount_path=${1#*=}
shift
;;
--backupdir=*) --backupdir=*)
backupdir_cmdline=${1#*=} backupdir_cmdline=${1#*=}
shift shift
@@ -1613,6 +1621,7 @@ $progname $version
Usage: $progname [options] Usage: $progname [options]
Options: Options:
-a, --automount <path> start automount for given path to get a valid target mountpoint.
-b, --backupdir <prefix> backupdir is a relative path that will be appended to target backup-root -b, --backupdir <prefix> backupdir is a relative path that will be appended to target backup-root
-d, --description <desc> Change the snapper description. Default: "latest incremental backup" -d, --description <desc> Change the snapper description. Default: "latest incremental backup"
--label-finished <desc> snapper description tagging successful jobs. Default: "dsnap-sync backup" --label-finished <desc> snapper description tagging successful jobs. Default: "dsnap-sync backup"