]> Sergey Matveev's repositories - dotfiles.git/blobdiff - bin/bin/zsnap
exec zstd
[dotfiles.git] / bin / bin / zsnap
index c25a9893179e0b4a48b30e96cc3e51b2c52bec34..05e09e005f1008e9a921fcd45200d1cc63035a14 100755 (executable)
@@ -44,21 +44,21 @@ case $action in
         dst=$3
         [[ -d $dst ]] || usage
         setopt PIPE_FAIL
-        zfs send -Rv $latest | zstd | $enccmd > $dst/$latest_filename.zfs.zst.gpg
+        zfs send -Rwv $latest | zstd | $enccmd > $dst/$latest_filename.zfs.zst.gpg
         sync
         touch $dst/$latest_filename.from
         ;;
     sync)
         dst=$3
         [[ -d $dst ]] || usage
-        latest_dst=($dst/*~$dst/.*(.L0Onn[1]))
+        latest_dst=($dst/*.from~$dst/.*(.Onn[1]))
         [[ $latest_dst ]]
         latest_dst=${latest_dst[1]}
         latest_dst=${${latest_dst##*/}%.from}
         [[ $latest_dst != $latest_filename ]]
         setopt PIPE_FAIL
         set -x
-        zfs send -Rv -i ${latest_dst:gs#%#/} $latest | zstd | $enccmd > \
+        zfs send -Rwv -i ${latest_dst:gs#%#/} $latest | zstd | $enccmd > \
             $dst/$latest_filename.zfs.zst.gpg
         set +x
         sync