BackupPC-users

Re: [BackupPC-users] Cannot compress negative numbers in pack at <snip>/Attrib.pm line 295

2010-09-12 06:42:58
Subject: Re: [BackupPC-users] Cannot compress negative numbers in pack at <snip>/Attrib.pm line 295
From: Garith Dugmore <garith AT saao.ac DOT za>
To: Craig Barratt <cbarratt AT users.sourceforge DOT net>
Date: Sun, 12 Sep 2010 12:39:30 +0200 (SAST)
Hi Craig,

After I did the changes below and restared BackupPC a full backup succeeded. 
This I found odd so I reverted back to the original Attrib.pm file and queue'ed 
another full backup - this succeeded. I suspect the problem in the first place 
after the upgrade to 3.2.0 was backupPC didn't restart properly (probably due 
to this being a custom install on Solaris and a home grown init.d script). 
Consider this request closed.

Thanks again for a great product and the speedy replies,

----- Original Message -----
> From: "Craig Barratt" <cbarratt AT users.sourceforge DOT net>
> To: "Garith Dugmore" <garith AT saao.ac DOT za>
> Cc: "Craig Barratt" <cbarratt AT users.sourceforge DOT net>, backuppc-users 
> AT lists.sourceforge DOT net
> Sent: Tuesday, 7 September, 2010 3:39:57 PM
> Subject: Re: [BackupPC-users] Cannot compress negative numbers in pack at 
> <snip>/Attrib.pm line 295
> Garith,
> 
> Yes, you are seeing a problem in a different part than where 3.2.0
> was fixed.
> 
> We need to find out why one of the metadata valus is negative, which
> causes pack() to fail. BackupPC expects the type, mode, uid, gid and
> size to all be non-negative numbers. I can't immediately see from the
> code how any of them could be negative.
> 
> Try changing this code in lib/BackupPC/Attrib.pm around lines 300-302:
> 
> $data .= pack("w a* w$nFldsW N$nFldsN", length($file), $file,
> @{$a->{files}{$file}}{@FldsUnixW},
> @{$a->{files}{$file}}{@FldsUnixN},
> );
> 
> to look like this:
> 
> eval {
> $data .= pack("w a* w$nFldsW N$nFldsN", length($file), $file,
> @{$a->{files}{$file}}{@FldsUnixW},
> @{$a->{files}{$file}}{@FldsUnixN},
> );
> };
> if ( $@ ) {
> $a->{_errStr} = "Can't pack attr for $file: " .
> Dumper($a->{files}{$file});
> }
> 
> You will also have to add:
> 
> use Data::Dumper;
> 
> near the top of the file where the other "use" lines are.
> 
> Hopefully when the error occurs you should get some output in the
> XferLOG file.
> 
> Craig

-- 

Garith Dugmore

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/