diff --git a/backup-zfs b/backup-zfs index c5bbc19..b37f1fc 100755 --- a/backup-zfs +++ b/backup-zfs @@ -140,7 +140,8 @@ if $tossh ; then ### ### create new snapshot on src ### - cur="$src@${tag}_$date" + snap="${tag}_$date" + cur="$src@$snap" ZFS "$srchost" snapshot -r "$cur" || die $? "zfs snapshot failed" ### @@ -167,10 +168,12 @@ if $tossh ; then | gpg --trust-model always --encrypt --recipient "$gpgid" \ | ssh "$desthost" "cat > \"$destpath/${tag}_$date.zfssnap.gpg\"" \ || die $? "zfs incremental send failed" + ssh "$desthost" "echo \"$snap\" > \"$destpath/.last\"" else ZFS "$srchost" send $send_opts -R -I "$last" "$cur" \ | ssh "$desthost" "cat > \"$destpath/${tag}_$date.zfssnap\"" \ || die $? "zfs incremental send failed" + ssh "$desthost" "echo \"$snap\" > \"$destpath/.last\"" fi fi