Re: [otrs] Backup.pl script Rotation feature doesn't work

It looks like the backup.pl script has been modified in 2.1.6 and goes about "rotation" in a different manner. However, I'm still using 2.0.4 and I have the same problem you describe. I looked into it (didn't need all those backups filling up the partition) in a bit more detail and the issue isn't the time part of the date stamp. The issue is that there is an error in the variable used for the backup directory. Line 132/133 currently reference Opts{'b'} when in fact they should reference Opts{'d'}. Make that simple change to backup.pl and the rotation feature will work properly. -Jeff
-----Original Message----- From: otrs-bounces@otrs.org [mailto:otrs-bounces@otrs.org] On Behalf Of Mike Morris Sent: Thursday, February 01, 2007 4:00 PM To: otrs@otrs.org Subject: [otrs] Backup.pl script Rotation feature doesn't work
I'm using the "backup.pl" script, which works fine and is a big help.
From looking at the code it's clear that the "-r XX" option is intended to "rotate", or delete old, backups. I'm using the suggested "-r 30" setting, but a couple of months into it, I have 60 backups, not 30 :-)
I took a look at the section that decides whether or not to delete a dir, and it looks to me like maybe it used to use only a date string for directory names, and now uses date_time... because the pattern matching doesn't allow for the time portion.
Anyway, a quick test... I renamed an old directory from:
2006-12-15_01-00 to just 2006-12-15
and running "backup.pl -r 30 ..." deleted the directory as advertised.
I'm not able to take the time at the moment to fix this... but thought I would document it for others, and maybe someone will come up with a fix before I have the time to look at it... say, about 3 -- 6 months :-)
Mike Morris The Music Place 1617 Willowhurst Avenue San Jose, CA 95125 (408) 445-ARTS (2787) ------------------------------------ Your Free Quote: Parachute for sale, cheap. Only used once, never opened. Slightly soiled. ------------------------------------
participants (1)
-
Jeff Baughn