Removed echo gates.

This commit is contained in:
Otho 2022-11-19 03:38:20 -05:00
parent adc473c95f
commit 1d093d39d6
Signed by: Otho
GPG Key ID: 16C720CD3BBE21D9

View File

@ -60,31 +60,31 @@ setup_mirror()
create_snapshot() create_snapshot()
{ {
id="`date -I`-`date +%s`" id="`date -I`-`date +%s`"
echo zfs snapshot -r ${BAKRNG_ROOT}@${id} zfs snapshot -r ${BAKRNG_ROOT}@${id}
} }
send_single_snapshot() send_single_snapshot()
{ {
BAKRNG_SEND_SNAPSHOT=`get_latest_snapshot` BAKRNG_SEND_SNAPSHOT=`get_latest_snapshot`
while read BAKRNG_REMOTE_ADDR BAKRNG_REMOTE_PORT BAKRNG_REMOTE_ROOT; do while read BAKRNG_REMOTE_ADDR BAKRNG_REMOTE_PORT BAKRNG_REMOTE_ROOT; do
echo "zfs send -R ${BAKRNG_ROOT}@${BAKRNG_SEND_SNAPSHOT} | zfs send -R ${BAKRNG_ROOT}@${BAKRNG_SEND_SNAPSHOT} |
ssh -i ~/.ssh/id_rsa \ ssh -i ~/.ssh/id_rsa \
-o port=${BAKRNG_REMOTE_PORT} ${BAKRNG_REMOTE_ADDR} \ -o port=${BAKRNG_REMOTE_PORT} ${BAKRNG_REMOTE_ADDR} \
zfs receive -dvu ${BAKRNG_REMOTE_ROOT}@${BAKRNG_SEND_SNAPSHOT}" zfs receive -dvu ${BAKRNG_REMOTE_ROOT}@${BAKRNG_SEND_SNAPSHOT}
done done
# echo $BAKRNG_SEND_SNAPSHOT > "last-snapshot.txt" echo $BAKRNG_SEND_SNAPSHOT > "last-snapshot.txt"
} }
send_incremental_snapshop() send_incremental_snapshop()
{ {
BAKRNG_SEND_SNAPSHOT=`get_latest_snapshot` BAKRNG_SEND_SNAPSHOT=`get_latest_snapshot`
while read BAKRNG_REMOTE_ADDR BAKRNG_REMOTE_PORT BAKRNG_REMOTE_ROOT; do while read BAKRNG_REMOTE_ADDR BAKRNG_REMOTE_PORT BAKRNG_REMOTE_ROOT; do
echo "zfs send -R -i `cat last-snapshot.txt` \ zfs send -R -i `cat last-snapshot.txt` \
${BAKRNG_ROOT}@${BAKRNG_SEND_SNAPSHOT} | ssh -i ~/.ssh/id_rsa \ ${BAKRNG_ROOT}@${BAKRNG_SEND_SNAPSHOT} | ssh -i ~/.ssh/id_rsa \
-o port=${BAKRNG_REMOTE_PORT} ${BAKRNG_REMOTE_ADDR} \ -o port=${BAKRNG_REMOTE_PORT} ${BAKRNG_REMOTE_ADDR} \
zfs receive -dvu ${BAKRNG_REMOTE_ROOT}@${BAKRNG_SEND_SNAPSHOT}" zfs receive -dvu ${BAKRNG_REMOTE_ROOT}@${BAKRNG_SEND_SNAPSHOT}
done done
# echo $BAKRNG_SEND_SNAPSHOT > "last-snapshot.txt" echo $BAKRNG_SEND_SNAPSHOT > "last-snapshot.txt"
} }