Bernhard Ott wrote:
> Ralf Gross wrote:
>
>> Hi,
>>
>> I use BackupPC since many years without hassle. But something seems to
>> be broken now.
>>
>> BackupPC 3.1 (source)
>> Debian Etch
>> xfs fs
>>
>>
>
> Hi Ralf,
> look for the thread "no cpool info shown on web interface" (2008-04)in
> the archives, Tino Schwarze found a solution for a xfs-related issue:
>
>
>> I found a fix for lib/BackupPC/Lib.pm (the line with "map {...}" is
>> the relevant one):
>>
>> --- lib/BackupPC/Lib.pm 2007-11-26 04:00:07.000000000 +0100
>> +++ lib/BackupPC/Lib.pm 2008-04-13 12:52:03.938619979 +0200
>> @@ -485,10 +485,15 @@
>>
>> from_to($path, "utf8", $need->{charsetLegacy})
>> if ( $need->{charsetLegacy} ne "" );
>> - return if ( !opendir(my $fh, $path) );
>> + my ($fh);
>> + if ( !opendir($fh, $path) ) {
>> + print "log ERROR: opendir ($path) failed\n";
>> + return;
>> + }
>> +
>> if ( $IODirentOk ) {
>> @entries = sort({ $a->{inode} <=> $b->{inode} } readdirent($fh));
>> - map { $_->{type} = 0 + $_->{type} } @entries; # make type numeric
>> + map { $_->{type} = 0 + $_->{type}; $_->{type} = undef if
>> ($_->{type} eq BPC_DT_UNKNOWN); }
For what it's worth, this line is the only change that is needed.
Replacing "return if ( !opendir(my $fh, $path) );" above just makes your
log file larger.
>> @entries; # make type numeric, unset unknown types
>> } else {
>> @entries = map { { name => $_} } readdir($fh);
>> }
>> @@ -553,9 +559,11 @@
>> return if ( !chdir($dir) );
>> my $entries = $bpc->dirRead(".", {inode => 1, type => 1});
>> #print Dumper($entries);
>> + #print ("log got ",scalar(@$entries)," entries for $dir\n");
>> foreach my $f ( @$entries ) {
>> next if ( $f->{name} eq ".." || $f->{name} eq "." && $dontDoCwd );
>> $param->{wanted}($f->{name}, "$dir/$f->{name}");
>> + #if ( $f->{type} != BPC_DT_DIR ) { print ("log skipping
>> non-directory ", $f->{name}, " type: ", $f->{type}, "\n"); }
>> next if ( $f->{type} != BPC_DT_DIR || $f->{name} eq "." );
>> chdir($f->{name});
>> $bpc->find($param, "$dir/$f->{name}", 1);
>>
>
>
> HTH,
> Bernhard
Chris
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
_______________________________________________
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/
|