Minor bugfix

This commit is contained in:
root 2022-06-06 00:42:57 +03:00
parent e7f6ee9b9b
commit 7f94a10a0e
2 changed files with 10 additions and 2 deletions

View File

@ -1,5 +1,10 @@
# foxBackup
## dependencies
* scp
* gzip
* gpg
## keys
-f = full backup (if not = increment)

View File

@ -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}