only cleanup if CLEAN_UP_TYPE and CLEAN_UP_VARIABLE are defined
This commit is contained in:
parent
1864e3ae98
commit
417d5262c7
1 changed files with 4 additions and 2 deletions
|
|
@ -420,10 +420,12 @@ include_exclude()
|
|||
duplicity_cleanup()
|
||||
{
|
||||
echo "-----------[ Duplicity Cleanup ]-----------" >> ${LOGFILE}
|
||||
eval ${ECHO} ${DUPLICITY} ${CLEAN_UP_TYPE} ${CLEAN_UP_VARIABLE} ${STATIC_OPTIONS} --force \
|
||||
if [[ ! -z ${CLEAN_UP_TYPE} && ! -z ${CLEAN_UP_VARIABLE} ]]; then
|
||||
eval ${ECHO} ${DUPLICITY} ${CLEAN_UP_TYPE} ${CLEAN_UP_VARIABLE} ${STATIC_OPTIONS} --force \
|
||||
${ENCRYPT} \
|
||||
${DEST} >> ${LOGFILE}
|
||||
echo >> ${LOGFILE}
|
||||
echo >> ${LOGFILE}
|
||||
fi
|
||||
if [ ! -z ${REMOVE_INCREMENTALS_OLDER_THAN} ] && [[ ${REMOVE_INCREMENTALS_OLDER_THAN} =~ ^[0-9]+$ ]]; then
|
||||
eval ${ECHO} ${DUPLICITY} remove-all-inc-of-but-n-full ${REMOVE_INCREMENTALS_OLDER_THAN} \
|
||||
${STATIC_OPTIONS} --force \
|
||||
|
|
|
|||
Loading…
Reference in a new issue