This script is the one I mentioned previously, it works along similar lines to what rhenderson has suggested.
To make it work, you copy it into /scripts/postcpbackup and it is run after a backup completes successfully. The script rotates daily, weekly and monthly copies keeping N copies of each. You can specify N separately for daily, weekly and monthly through keepdaily/keepweekly/keepmonthly variables, and no copies are made if those variables are set to empty or not set. For instance, the following would keep two copies of daily backups and 3 weeks of weekly and no monthly backups:
Code:
keepdaily=2
keepweekly=3
keepmonthly=
You can put these settings in the script itself or in a file /backup/cpbackup/.postcpbackup
For the script, see www.whitedoggreenfrog.com/scripts - it's the top paragraph at the moment, postcpbackup...