From 7f94a10a0e9b4e2466d9b58e9cb19c16f3f60b4c Mon Sep 17 00:00:00 2001 From: root Date: Mon, 6 Jun 2022 00:42:57 +0300 Subject: [PATCH] Minor bugfix --- README.md | 5 +++++ backup.sh | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3475ac3..65d7865 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ # foxBackup +## dependencies +* scp +* gzip +* gpg + ## keys -f = full backup (if not = increment) diff --git a/backup.sh b/backup.sh index c305b74..29e6337 100755 --- a/backup.sh +++ b/backup.sh @@ -5,7 +5,6 @@ DIRECTORY=`dirname "$ABSOLUTE_FILENAME"` source ${DIRECTORY}/config -uuid=`uuid` stamp=`date +%s`-`date +"%Y%m%d-%H%M%S-I"` do_full="" do_quet=0 @@ -136,7 +135,11 @@ if [ -n "${sshhost}" ] then for xfile_item in `ls ${prefix}/compressed` do - scp -B -i ${sshkey} ${prefix}/compressed/${xfile_item} ${sshuser}@${sshhost}:${sshpath} > /dev/null + if [ "${do_quet}" == 0 ] + then + echo "Sending via SSH $xfile_item" + fi + scp -B -P ${sshport} -i ${sshkey} ${prefix}/compressed/${xfile_item} ${sshuser}@${sshhost}:${sshpath} > /dev/null if [ "$?" == 0 ] then rm -f ${prefix}/compressed/${xfile_item}