mirror of
https://asciireactor.com/o4data/zfs-backup.git
synced 2024-11-22 04:35:06 +00:00
Removed unused function.
This commit is contained in:
parent
dec31cec5a
commit
07d48d3031
19
backup.sh
19
backup.sh
@ -21,25 +21,6 @@ list_active_datasets()
|
||||
zfs list | tail -n +2 | cut -d' ' -f1|grep ${BG_ROOT}
|
||||
}
|
||||
|
||||
read_datasets() {
|
||||
while read BG_REMOTE_ADDR BG_REMOTE_PORT BG_REMOTE_ROOT BG_REMOTE_USER; do
|
||||
case $BG_REMOTE_ADDR in
|
||||
\#*) continue;;
|
||||
esac
|
||||
if [ $BG_TEST_MODE = "TRUE" ]; then
|
||||
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 -vu ${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}
|
||||
fi
|
||||
done < ${datasets_file}
|
||||
}
|
||||
|
||||
# compare_datasets()
|
||||
|
||||
create_datasets() {
|
||||
|
Loading…
Reference in New Issue
Block a user