chiark / gitweb /
chiark-backup's snaprsync has new rsynccompress option.
[chiark-utils.git] / backup / snaprsync
index 3b4bfc7..91b2ce8 100755 (executable)
@@ -14,6 +14,7 @@
        bwlimit=
        subdir=.
        rsyncopts=
+       rsynccompress=z
        sshopts=
        summer=summer
 
@@ -33,7 +34,7 @@ while true; do
                case "$name" in
                rhost|device|mountpoint|localarea);;
                localprevious|snapkind|rsharedir|retcdir|rvardir|bwlimit);;
-               subdir|rsyncopts|sshopts|summer);;
+               subdir|rsyncopts|rsynccompress|sshopts|summer);;
                *) badusage "unknown setting $name";;
                esac
                eval "$name=\$value"
@@ -76,7 +77,7 @@ td=`mktemp -td`
 mkfifo -m 600 $td/sentinel
 exec 4<>$td/sentinel
 
-x ssh $sshopts $rhost "$sshpfx $rsharedir/snap-drop"
+x ssh $sshopts $rhost "$sshpfx $rsharedir/snap-drop $rvardir"
 ssh $sshopts $rhost "
        $sshpfx
        set -e
@@ -100,7 +101,7 @@ ssh $sshopts $rhost <$td/sentinel 4<&- "
   cd ..
 " &
 xspawned rsum
-x $rsync -aHSxz --numeric-ids --delete $rsyncopts \
+x $rsync -aHSx$rsynccompress --numeric-ids --delete $rsyncopts \
        ${localprevious:+--link-dest} $localprevious \
        $rhost:$rvardir/snap-mount/$subdir $localarea/.
 date -u "+ $datefmt rsyncdone"