#45 Let user pick # of months/weeks before rotate

options/variables
closed
nobody
5
2011-08-14
2011-07-08
Anonymous
No

You set the weekly and monthly rotation to be 5 months. I would appreciate it instead of creating an option line before like the option lines to select which dbs are backed up where you could input 2 numbers, 1 for weekly backups to keep, and 1 for monthly backups to keep. Could be simple variables like WEEKOPT=6 and MONOPT=6. then at the beginning of the script just do your time math:

let "MONROTATE=$MONOPT*30"
let "WEEKROTATE=$WEEKOPT*7"

Then when you get to line 606 and 607

${ECHO} "Rotating 6 month backups for ${MDB}"
${FIND} "${BACKUPDIR}/monthly/${MDB}" -mtime +180 -type f -exec ${RM} -v {} \;

Replace the 6 with $MONOPT and 180 with $MONROTATE.

Discussion

  • PittaGurneyi
    PittaGurneyi
    2011-08-14

    Added in version 3.0_beta.

     
  • PittaGurneyi
    PittaGurneyi
    2011-08-14

    • status: open --> closed