Quote:
Originally Posted by iway The thing is, I need it to be more clever than that, since this solution would delete, for example, the full backup of october 20th, and leave the incrementals of 21st, 22nd, etc. These are of no use without the underlying full backup, are they?
Thanks
Chris |
This script deletes all backups (full and incremental) except the last full
and subsequent incrementals. It is not a perfect script (some incrementals
remains) but it's all you can do with just two commands.
#!/bin/sh
BCKDIR="/opt/zimbra/backup/sessions"
LIMIT=`ls -1drt $BCKDIR/full* | tail -2 | head -1`
find $BCKDIR -maxdepth 1 -type d -not -newer $LIMIT -delete
PS: i suggest you also to reprogram zimbra backup crontab
using zmschedulebackup