Craig Barratt wrote: > Stian Jordet writes: > >>> Umm, sorry to nag you with this again, but I haven't taken a backup for >>> almost two weeks, trying to get this fixed first. Was this the only way, >>> and what am I doing wrong? What info does it need that it doesn't find? >> I think I found why it wasn't working. You (seem) to have a typo in line >> 171 of BackupPC_fixupBackupSummary. It should have been $3, not $2. >> >> And in line 157 I think you should have $1, not $str. > > You're right on both counts. And the code to write the file out > wasn't there. I somehow ended up with an incomplete version in > the 3.0.0beta release. > >> And third, somehow I need to have the parsedate statements outside the >> array to make them work. Have no idea why (I know absolutely nothing >> about perl whatsoever!). > > I don't see that issue. > >> And so on. While this may seem right (for what I know, that is), I >> wonder why they are sorted wrong, and "fillFromNum" on fulls are totally >> weird, but that doesn't matter, probably? > > fillFromNum matches the "num" (backup number), not the index. > I'm not sure why the sorting isn't working - they should be > in "num" order. > >> But what I _really_ wonder about, is how to make this a pc/$host/backups >> file? :) > > I added the write function $bpc->BackupInfoWrite($host, @Backups). > > I'm attaching a corrected version. To run this you will need > to change the 'use lib "/usr/local/BackupPC/lib";' at line 41 > to the correct path for you installation.
Great! Thanks, got it working now. But I still need to have the parsedate() outside the array, else I get this result: { 'noFill' => 0, '' => 'endTime', 'num' => 33, 'size' => '26265851', 'fillFromNum' => '44', 'xferErrs' => '0', 'startTime' => 1155146402, 'mangle' => 1, 'nFilesExist' => 0, '1155146562' => '', 'tarErrs' => 0, 'xferBadShare' => '0', 'sizeExist' => 0, 'level' => 0, 'nFiles' => '2678', 'sizeExistComp' => 0, 'compress' => 3, 'type' => 'full', 'xferBadFile' => '0' }, Which obviously is wrong. I also need to shorten the regex at line 156 to if ( $str =~ /^(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}) (full|incr|partial) backup started / ) { (as per the patch earlier). But now everything works :) Thank you very much! -Stian ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/backuppc-users http://backuppc.sourceforge.net/