mirror of
https://github.com/bashclub/bashclub-zfs-push-pull.git
synced 2024-11-07 13:01:58 +01:00
ssh mode: fix last snapshot tracking
This commit is contained in:
parent
28c7cbc747
commit
afb2b924ba
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user