add -R to send

This commit is contained in:
Jochen Welzel 2021-01-06 11:19:01 +01:00
parent 0e285fe222
commit a538042eba

View File

@ -87,10 +87,10 @@ then
LASTBACKUP=$(zfs get backup:date -H -o value $SRCZFS) LASTBACKUP=$(zfs get backup:date -H -o value $SRCZFS)
LASTSNAP="backup_$LASTBACKUP" LASTSNAP="backup_$LASTBACKUP"
echo "Sending incremental snapshot from $LASTSNAP" echo "Sending incremental snapshot from $LASTSNAP"
zfs send -i "$SRCZFS"@"$LASTSNAP" "$SRCZFS"@"$SNAPNAME" | pv -L 500M | ssh $DESTHOST sudo zfs recv -F $DESTZFS zfs send -R -i "$SRCZFS"@"$LASTSNAP" "$SRCZFS"@"$SNAPNAME" | pv -L $LIMIT | ssh $DESTHOST sudo zfs recv -F $DESTZFS
else else
echo "Sending full snapshot" echo "Sending full snapshot"
zfs send "$SRCZFS"@"$SNAPNAME" | pv -L $LIMIT | ssh $DESTHOST sudo zfs recv -F $DESTZFS zfs send -R "$SRCZFS"@"$SNAPNAME" | pv -L $LIMIT | ssh $DESTHOST sudo zfs recv -F $DESTZFS
fi fi
if [ $? -eq 0 ] if [ $? -eq 0 ]
then then