|
From: Joe Z. <joe...@za...> - 2006-03-17 20:57:41
|
Here's a fix until I can update CVS. Modify inc/class_cleanup.php
Change this line (near the top):
$this->old_date = date("Y", $old_stamp) . '.' . date("z", $old_stamp);
To this:
$this->old_date = date("Y", $old_stamp) . '.' . sprintf("%03d",
date("z", $old_stamp));
Joe
Joe Zacky wrote:
> Oh my...you are SO right! I see the same thing happening on my system.
> It's because the leading zero is dropped on the day portion of the
> date. In your example, the code in class_cleanup.php is seeing
> 2006.074 as less than 2006.45.
>
> if(substr($file, -8) < $this->old_date){ // File is old
>
> I'm commenting out the cleanup in /etc/cron.daily/backup.php on my
> system until I fix this.
>
> // Delete old incremental files and dirs
> // $cleanup->delete_files();
> // $cleanup->delete_dirs();
>
> James, thank you SO MUCH for pursuing this problem. I should have
> payed more attention sooner.
>
> Joe
>
> James W. Beauchamp wrote:
>> Joe:
>> In continuing to find out why Bobs won't save any incrementals I
>> discovered this in the log file:
>>
>> /etc/cron.daily/backup.php:
>>
>> PHP Notice: Undefined variable: result in
>> /var/www/html/bobs/inc/class_backup.php on line 222
>> PHP Notice: Undefined index: where in
>> /var/www/html/bobs/inc/class_db.php on line 35
>> Content-type: text/html
>>
>> Then it happily starts deleting files. It has only been running
>> about 10 days but its deleting everything in the incremental folder.
>> The date is correct on the machine so that's not it.
>>
>> Incremental cleanup retention days: 30
>> Removing incremental files older than (YYYY.DDD): 2006.45
>> Removed /backup/bobsdata/incremental/george/Quickbooks/Accounting
>> Systems &
>> Procedures/Quickbooks_Working_file/katyas_corp_2004A.qbw.2006.074
>> .......
>>
>> then I get another one of these:
>>
>> PHP Notice: Undefined variable: result in
>> /var/www/html/bobs/inc/class_backup.php on line 222
>> PHP Notice: Undefined index: where in
>> /var/www/html/bobs/inc/class_db.php on line 35
>> Incremental cleanup retention days: 30
>> Removing incremental files older than (YYYY.DDD): 2006.45
>> PHP Notice: Undefined variable: result in
>> /var/www/html/bobs/inc/class_backup.php on line 222
>> PHP Notice: Undefined index: where in
>> /var/www/html/bobs/inc/class_db.php on line 35
>> Incremental cleanup retention days: 30
>> Removing incremental files older than (YYYY.DDD): 2006.45
>> Removed
>> /backup/bobsdata/incremental/george/operations/Engineering/DRAWINGS
>> ARCHIVE/_Fertilizer Spreaders/Pull-Type/Single Axle/Frames/STD
>> Clearance/9'psgd 8-bolt_2005.pdf.2006.074
>>
>> And it starts deleting again.
>>
>> It does this for each share I'm backing up. Any idea on how tofix this?
>>
>> Thanks
>>
>> James
>>
>>
>>
>>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting
> language
> that extends applications into web and mobile media. Attend the live
> webcast
> and join the prime developer group breaking into this new coding
> territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> _______________________________________________
> Bobs-devel mailing list
> Bob...@li...
> https://lists.sourceforge.net/lists/listinfo/bobs-devel
>
>
|