Added code to delete all but the most recent 10 backups
This commit is contained in:
parent
af4a0e2aa5
commit
62a3163d5b
1 changed files with 2 additions and 0 deletions
|
@ -63,6 +63,8 @@ if [ "${ec}" != "0" ]; then
|
|||
else
|
||||
logcmd "xz -9 ${ofp}" "${logfp}"
|
||||
fi
|
||||
buff=`ls -1rt maintain/backups/${dbname}_backup-*.sql.xz | head -n -10`
|
||||
for fn in $buff; do rm "$fn"; done
|
||||
[ $ok -eq 1 ] && subj="maintain.bash: tutto ok :-)" || subj="maintain.bash: ci sono errori :-("
|
||||
body="[[[ ${logfp} ]]]\n\n"
|
||||
body+=`cat "${logfp}"`
|
||||
|
|
Loading…
Reference in a new issue