Skip to content
Browse files

Don't need to unset the lastSend snapshot if we are doing a first-tim…

…e replication
  • Loading branch information...
1 parent 7078e92 commit 0c5977fc38fc61b779b668c0fb1f62a43bff77f4 @kmoore134 kmoore134 committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 src-sh/lpreserver/backend/functions.sh
View
4 src-sh/lpreserver/backend/functions.sh
@@ -303,7 +303,9 @@ start_rep_task() {
if [ $zStatus -eq 0 ] ; then
# SUCCESS!
# Lets mark our new latest snapshot and unmark the last one
- zfs set backup:lpreserver=' ' ${LDATA}@$lastSEND
+ if [ -n "$lastSEND" ] ; then
+ zfs set backup:lpreserver=' ' ${LDATA}@$lastSEND
+ fi
zfs set backup:lpreserver=LATEST ${LDATA}@$lastSNAP
echo_log "Finished replication task on ${DATASET}"
save_rep_props

0 comments on commit 0c5977f

Please sign in to comment.
Something went wrong with that request. Please try again.