From 793f1c782b703a9050f95a06eb8d6847af58f64e Mon Sep 17 00:00:00 2001 From: Gionatan Danti Date: Tue, 1 May 2018 09:32:18 +0200 Subject: [PATCH] Reintroduced escapeshellparam for remote command and updated README file --- README.md | 8 ++++++++ syncoid | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cc75bdf..7a9b76c 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,10 @@ Which would be enough to tell sanoid to take and keep 36 hourly snapshots, 30 da This will process your sanoid.conf file, it will NOT create snapshots, but it will purge expired ones. ++ --force-prune + + Purges expired snapshots even if a send/recv is in progress + + --monitor-snapshots This option is designed to be run by a Nagios monitoring system. It reports on the health of your snapshots. @@ -150,6 +154,10 @@ As of 1.4.18, syncoid also automatically supports and enables resume of interrup This argument tells syncoid to restrict itself to existing snapshots, instead of creating a semi-ephemeral syncoid snapshot at execution time. Especially useful in multi-target (A->B, A->C) replication schemes, where you might otherwise accumulate a large number of foreign syncoid snapshots. ++ --no-clone-rollback + + Does not rollback clones on target + + --no-resume This argument tells syncoid to not use resumeable zfs send/receive streams. diff --git a/syncoid b/syncoid index c6c85ed..0a2fe4a 100755 --- a/syncoid +++ b/syncoid @@ -366,7 +366,7 @@ sub syncdataset { if ($debug) { print "DEBUG: rolling back target to $targetfs\@$matchingsnap...\n"; } if ($targethost ne '') { if ($debug) { print "$sshcmd $targethost $targetsudocmd $zfscmd rollback $rollbacktype $targetfs\@$matchingsnap\n"; } - system ("$sshcmd $targethost $targetsudocmd $zfscmd rollback $rollbacktype $targetfs\@$matchingsnap"); + system ("$sshcmd $targethost " . escapeshellparam("$targetsudocmd $zfscmd rollback $rollbacktype $targetfsescaped\@$matchingsnapescaped")); } else { if ($debug) { print "$targetsudocmd $zfscmd rollback $rollbacktype $targetfs\@$matchingsnap\n"; } system ("$targetsudocmd $zfscmd rollback $rollbacktype $targetfs\@$matchingsnap");