From 1d093d39d6357a67713d09ab29f9de79f0833b2d Mon Sep 17 00:00:00 2001 From: Otho Date: Sat, 19 Nov 2022 03:38:20 -0500 Subject: [PATCH] Removed echo gates. --- backup.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/backup.sh b/backup.sh index 0cb78ce..8072b4d 100755 --- a/backup.sh +++ b/backup.sh @@ -60,31 +60,31 @@ setup_mirror() create_snapshot() { id="`date -I`-`date +%s`" - echo zfs snapshot -r ${BAKRNG_ROOT}@${id} + zfs snapshot -r ${BAKRNG_ROOT}@${id} } send_single_snapshot() { BAKRNG_SEND_SNAPSHOT=`get_latest_snapshot` 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 \ -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 - # echo $BAKRNG_SEND_SNAPSHOT > "last-snapshot.txt" + echo $BAKRNG_SEND_SNAPSHOT > "last-snapshot.txt" } send_incremental_snapshop() { BAKRNG_SEND_SNAPSHOT=`get_latest_snapshot` 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 \ -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 - # echo $BAKRNG_SEND_SNAPSHOT > "last-snapshot.txt" + echo $BAKRNG_SEND_SNAPSHOT > "last-snapshot.txt" }