forked from ISTI-ansible-roles/ansible-roles
Use the old 'find' command to remove the old backups, until we fix the bug of the new procedure.
This commit is contained in:
parent
d8cb04249c
commit
312f327e0f
|
@ -41,11 +41,12 @@ create_backup_dirs() {
|
||||||
|
|
||||||
cleanup_old_backups() {
|
cleanup_old_backups() {
|
||||||
# Remove the old backups
|
# Remove the old backups
|
||||||
TODELETE=`ls ${BACKUPDIR}/history | awk -F '.' '{print $NF}' | sort -ruV | tail -n +${N_DAYS_TO_SPARE}`
|
find ${HISTDIR} -ctime +${N_DAYS_TO_SPARE} -type f -exec rm -f {} \;
|
||||||
for i in ${TODELETE}
|
# TODELETE=$( /bin/ls "${HISTDIR}/" | awk -F '.' '{print $NF}' | sort -ruV | tail -n +${N_DAYS_TO_SPARE} )
|
||||||
do
|
# for i in ${TODELETE}
|
||||||
rm -f ${BACKUPDIR}/history/*.$i
|
# do
|
||||||
done
|
# rm -f "${HISTDIR}/*.${i}"
|
||||||
|
# done
|
||||||
}
|
}
|
||||||
|
|
||||||
create_db_list() {
|
create_db_list() {
|
||||||
|
|
Loading…
Reference in New Issue