Skip to content

Commit

Permalink
Add remote snapshot name to warning when local snap/bm is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Jehops committed Oct 3, 2017
1 parent e485cf3 commit efc616e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions zap
Original file line number Diff line number Diff line change
Expand Up @@ -357,14 +357,16 @@ $sshto:$rloc/$fs was not created by zap."
if [ "$l_ts" -gt "$r_ts" ]; then
## check if there is a local snapshot for the remote snapshot
if ! sp=$(zfs list -rd1 -t snap -H -o name "$1" | grep "$rsnap"); then
warn "Failed to find local snapshot for remote snapshot."
warn "Failed to find local snapshot for remote snapshot \
${rloc}${fs}${rsnap}."
warn "Will attempt to fall back to a bookmark, but all \
intermediary snapshots will not be sent."
fi
## check if there is a bookmark for the remote snapshot
if [ -z "$sp" ] && ! sp=$(zfs list -rd1 -t bookmark -H -o name \
"$1" | grep "${rsnap#@}"); then
warn "Failed to find bookmark for remote snapshot."
warn "Failed to find bookmark for remote snapshot \
${rloc}${fs}${rsnap}."
warn "Failed to replicate $lsnap to $sshto:$rloc."
else
if echo "$sp" | grep -q '@'; then i='-I'; else i='-i'; fi
Expand Down

0 comments on commit efc616e

Please sign in to comment.