mirror of
https://asciireactor.com/o4data/zfs-backup.git
synced 2024-11-22 04:25:06 +00:00
Add zfs-recv option to keep partial after interupt.
This commit is contained in:
parent
07d48d3031
commit
0990f17d87
@ -92,12 +92,12 @@ send_single_snapshot()
|
||||
echo zfs send -R ${BG_ROOT}@${BG_NEW_SNAPSHOT}
|
||||
echo ssh -i ~/.ssh/id_rsa -o port=${BG_REMOTE_PORT} \
|
||||
${BG_REMOTE_USER}@${BG_REMOTE_ADDR} \
|
||||
zfs receive -dvu ${BG_REMOTE_ROOT}
|
||||
zfs receive -sdvu ${BG_REMOTE_ROOT}
|
||||
else
|
||||
zfs send -R ${BG_ROOT}@${BG_NEW_SNAPSHOT} |
|
||||
ssh -i ~/.ssh/id_rsa -o port=${BG_REMOTE_PORT} \
|
||||
${BG_REMOTE_USER}@${BG_REMOTE_ADDR} \
|
||||
zfs receive -dvu ${BG_REMOTE_ROOT}
|
||||
zfs receive -sdvu ${BG_REMOTE_ROOT}
|
||||
fi
|
||||
done < sendnodes.tmp
|
||||
rm sendnodes.tmp
|
||||
@ -116,7 +116,7 @@ send_incremental_snapshot()
|
||||
# zfs send -R -i `cat old-snapshot.txt` ${BG_ROOT}@${BG_NEW_SNAPSHOT} |
|
||||
# ssh -i ~/.ssh/id_rsa -o port=${BG_REMOTE_PORT} \
|
||||
# ${BG_REMOTE_USER}@${BG_REMOTE_ADDR} \
|
||||
# zfs receive -dvu ${BG_REMOTE_ROOT}@${BG_NEW_SNAPSHOT}
|
||||
# zfs receive -sdvu ${BG_REMOTE_ROOT}@${BG_NEW_SNAPSHOT}
|
||||
#done
|
||||
echo $BG_NEW_SNAPSHOT > "old-snapshot.txt"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user