Update 'duplicacy.sh'
This commit is contained in:
@@ -16,14 +16,12 @@ echo $$ > ${lockfile}
|
|||||||
|
|
||||||
# run the backup
|
# run the backup
|
||||||
for folder in ${FOLDERS_TO_BACKUP[@]}; do
|
for folder in ${FOLDERS_TO_BACKUP[@]}; do
|
||||||
# removes the slashes and replaces with a dash
|
|
||||||
id=${HOST}${folder////-}
|
|
||||||
cd ${folder}
|
cd ${folder}
|
||||||
if [ -d "${folder}/.duplicacy" ]; then
|
if [ -d "${folder}/.duplicacy" ]; then
|
||||||
duplicacy -verbose -log backup -stats >> ${LOGFILE} 2>&1
|
duplicacy -verbose -log backup -stats >> ${LOGFILE} 2>&1
|
||||||
# compress the logs
|
|
||||||
gzip $(dirname ${LOGFILE})/*.log
|
|
||||||
else
|
else
|
||||||
|
# removes the slashes and replaces with a dash
|
||||||
|
id=${HOST}${folder////-}
|
||||||
# sftp password DUPLICACY_SSH_PASSWORD DUPLICACY_<STORAGENAME>_SSH_PASSWORD ssh_password
|
# sftp password DUPLICACY_SSH_PASSWORD DUPLICACY_<STORAGENAME>_SSH_PASSWORD ssh_password
|
||||||
echo "Please enter duplicacy ssh password"
|
echo "Please enter duplicacy ssh password"
|
||||||
read -s SSH_PASSWORD
|
read -s SSH_PASSWORD
|
||||||
@@ -34,5 +32,8 @@ for folder in ${FOLDERS_TO_BACKUP[@]}; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# compress the logs
|
||||||
|
gzip $(dirname ${LOGFILE})/*.log
|
||||||
|
|
||||||
# clean up lockfile
|
# clean up lockfile
|
||||||
rm -f ${lockfile}
|
rm -f ${lockfile}
|
||||||
Reference in New Issue
Block a user