mirror of
https://asciireactor.com/o4data/zfs-backup.git
synced 2024-11-22 04:15:05 +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 zfs send -R ${BG_ROOT}@${BG_NEW_SNAPSHOT}
|
||||||
echo ssh -i ~/.ssh/id_rsa -o port=${BG_REMOTE_PORT} \
|
echo ssh -i ~/.ssh/id_rsa -o port=${BG_REMOTE_PORT} \
|
||||||
${BG_REMOTE_USER}@${BG_REMOTE_ADDR} \
|
${BG_REMOTE_USER}@${BG_REMOTE_ADDR} \
|
||||||
zfs receive -dvu ${BG_REMOTE_ROOT}
|
zfs receive -sdvu ${BG_REMOTE_ROOT}
|
||||||
else
|
else
|
||||||
zfs send -R ${BG_ROOT}@${BG_NEW_SNAPSHOT} |
|
zfs send -R ${BG_ROOT}@${BG_NEW_SNAPSHOT} |
|
||||||
ssh -i ~/.ssh/id_rsa -o port=${BG_REMOTE_PORT} \
|
ssh -i ~/.ssh/id_rsa -o port=${BG_REMOTE_PORT} \
|
||||||
${BG_REMOTE_USER}@${BG_REMOTE_ADDR} \
|
${BG_REMOTE_USER}@${BG_REMOTE_ADDR} \
|
||||||
zfs receive -dvu ${BG_REMOTE_ROOT}
|
zfs receive -sdvu ${BG_REMOTE_ROOT}
|
||||||
fi
|
fi
|
||||||
done < sendnodes.tmp
|
done < sendnodes.tmp
|
||||||
rm 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} |
|
# zfs send -R -i `cat old-snapshot.txt` ${BG_ROOT}@${BG_NEW_SNAPSHOT} |
|
||||||
# ssh -i ~/.ssh/id_rsa -o port=${BG_REMOTE_PORT} \
|
# ssh -i ~/.ssh/id_rsa -o port=${BG_REMOTE_PORT} \
|
||||||
# ${BG_REMOTE_USER}@${BG_REMOTE_ADDR} \
|
# ${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
|
#done
|
||||||
echo $BG_NEW_SNAPSHOT > "old-snapshot.txt"
|
echo $BG_NEW_SNAPSHOT > "old-snapshot.txt"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user