Re: [Automysqlbackup-users] Weekly backups not being rotated?
Automatic MySQL Backup
Brought to you by:
wipe_out
From: WipeOut <wip...@us...> - 2009-07-22 10:22:50
|
Adrian Simmons wrote: > On 22 Jul 2009, at 01:43, Russell Jones wrote: >> Am I not understanding something correctly, or is there an error I am >> encountering? > You do have 2.5? > # VER 2.4 - (2006-01-23) > # Fixed bug where weekly backups were not being rotated. (Fix by > wolf02) > > I have 2.5 and have the same problem, but it's worth checking I guess. > > There are some differences between the routines used for rotating > weekly backup depending on whether you use a separate directory for > each db or whether all db's are in one. I use the separate directory > setting, I think there is a bug with that... > > At line 539: > > eval rm -fv "$BACKUPDIR/weekly/$DB_week.$REMW.*" > > ought to be: > > eval rm -fv "$BACKUPDIR/weekly/${DB}_week.$REMW.*" > > Because in the former the variable name will be $DB_week. which > doesn't exist, rather than $DB which is the db name being used. I'll > give this change a shot. But I'm a shell scripting noob so use it at > your own risk! > > Adrian The updated version will use "find" and delete all files older than a specified number of days.. Should simplify the existing logic and clean up everything.. :) |