Update 'templates/postgresql-backup.sh.j2'
This commit is contained in:
parent
c38d2fb895
commit
c9aa64f79a
|
@ -49,9 +49,9 @@ cleanup_old_backups() {
|
|||
# find ${HISTDIR} -mtime +${N_DAYS_TO_SPARE} -type f -exec rm -fv {} \;
|
||||
ORD_DUMP_TO_DEL=$( expr $N_DAYS_TO_SPARE + 1 )
|
||||
TODELETE=$( /bin/ls "${HISTDIR}/" | awk -F '.' '{print $NF}' | sort -ruV | tail -n +${ORD_DUMP_TO_DEL} )
|
||||
for i in ${TODELETE}
|
||||
for DATETODELETE in ${TODELETE}
|
||||
do
|
||||
rm -f "${HISTDIR}/*.${i}"
|
||||
rm -fv "${DATETODELETE}/*.${i}"
|
||||
done
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue