Craig,

The patch seems to work fine for us.

cheers,

ski

Craig Barratt wrote:
Ski Kacoroski writes:


I am running backuppc_2.1.1-2 on debian stable (sarge) servers. I upgraded from backuppc_2.1.0-9 a bit ago (not sure when). We just noticed that for Entourage email databases (like PST files on windows), the database is only being partially backed up and it shows up as a directory in the web GUI instead of a single file. I checked the actual file on disk and it was only about 1/7th the size of the real file on the client so it was only partially backed up. When I click on the directory (that should be a file) in the web gui I get:


I assume you are running xtar.  I would guess this is the same issue
identified a week ago.  It appears to be a stupid bug in the way the
.rsrc directories are stored.  I'm attaching 2 emails.


Error: Can't browse bad directory name /Users/kkocha/Documents/Microsoft User Data/Office 2004 Identities/Main Identity/Database


Try the following: rename the attrib file in that directory
to, say, attrib.orig.  You should now be able to see the
correct file.

I haven't heard back from Samual on whether the patch worked.

Craig

---------- Forwarded message ----------
To:   Samuel Bancal <[EMAIL PROTECTED]>
From: Craig Barratt <[EMAIL PROTECTED]>
Cc:   backuppc-users@lists.sourceforge.net
Date: Sun, 06 Nov 2005 13:23:14 -0800
Subj: [BackupPC-users] Re: Couldnt restore some files

Samuel Bancal writes:


First of all : Thank you for this great utility!
We're backing up nearly 60 workstations ... and the users are really enjoying it!
... except one today ... We've got a strange problem :
One user had to restore files on a client and noticed that some files weren't restored.
This client was backed up through ssh with xtar. (OS = MacOSX)


Thanks for the attrib file.  It shows that the pathCreate() fix
to BackupPC_tarExtract to handle creating the .rsrc directories
for use with xtar is broken.

It is possible to fix things up so the old backups can be usefully
restored.  Do you need to do that?  One thing to try is to simply
rename the attrib file to, say, attrib.save, and that should allow
the missing files to be visible.  However, the uid/gid and attributes
will not be correct.  Another fix that requires from coding is to
fixup the attrib files.

In the meantime, I'll work on a patch to BackupPC_tarExtract that
I would like you to test.  Unfortunately I do not have a Mac to
test with.  I'm about to get on a plane to Europe, so I'll be out
of touch for a while.

Craig

---------- Forwarded message ----------
To:   Samuel Bancal <[EMAIL PROTECTED]>
From: Craig Barratt <[EMAIL PROTECTED]>
Cc:   Jean-Raymond FISCHER <[EMAIL PROTECTED]>
Date: Wed, 09 Nov 2005 14:39:08 -0800
Subj: Re: Couldnt restore some files
Samuel Bancal writes:


Some little news: We have done some extended tests and have noticed that :
- It happens on every Mac OSX
- It is "always" the first file (alphabetically) of the current directory
- There is always a .rsrc directory added on the current folder

These elements confirm, I think, the origin of the problem, which is between xtar & BackupPC_tarExtract.


Samuel,

Thanks for the update.  Unfortunately I'm very busy on my Europe
trip, so I'm behind on my email.  On one of my plane flights I did
work on a fix to BackupPC_tarExtract. I've attached the patch - use
the patch command to apply to BackupPC_tarExtract.

Unfortunately it is not tested at all.  So if you are willing
to give it a test that would be great.  If it doesn't work
correctly please uncomment the two debug print statements
in the pathCreate() function and send me the relevant lines
from the XferLOG file.

Regards,
Craig

--- BackupPC_tarExtract 2005-09-05 14:36:20.000000000 -0700
+++ BackupPC_tarExtract 2005-11-09 14:21:11.346040000 -0800
@@ -251,7 +251,7 @@
         $name     = $longName if ( defined($longName) );
         $linkname = $longLink if ( defined($longLink) );
         $name     =~ s{^\./+}{};
-        $name     =~ s{/+$}{};
+        $name     =~ s{/+\.?$}{};
         $name     =~ s{//+}{/}g;
         return {
             name       => $name,
@@ -313,7 +313,7 @@
         #
         my($nRead);
         #print("Reading $f->{name}, $f->{size} bytes, type $f->{type}\n");
-        pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
+        pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
         my $poolWrite = BackupPC::PoolWrite->new($bpc,
                                          "$OutDir/$ShareName/$f->{mangleName}",
                                          $f->{size}, $Compress);
@@ -351,7 +351,7 @@
        # a plain file.
         #
         $f->{size} = length($f->{linkname});
-        pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
+        pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
         my $poolWrite = BackupPC::PoolWrite->new($bpc,
                                          "$OutDir/$ShareName/$f->{mangleName}",
                                          $f->{size}, $Compress);
@@ -369,7 +369,7 @@
         # contents.
         #
         $f->{size} = length($f->{linkname});
-        pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
+        pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
         my $poolWrite = BackupPC::PoolWrite->new($bpc,
                                          "$OutDir/$ShareName/$f->{mangleName}",
                                          $f->{size}, $Compress);
@@ -393,7 +393,7 @@
         } else {
             $data = "$f->{devmajor},$f->{devminor}";
         }
-        pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
+        pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
         my $poolWrite = BackupPC::PoolWrite->new($bpc,
                                          "$OutDir/$ShareName/$f->{mangleName}",
                                          length($data), $Compress);
@@ -487,17 +487,20 @@
 #
 sub pathCreate
 {
-    my($dir, $fullPath, $file, $f) = @_;
+    my($dir, $fullPath, $f) = @_;
#
     # Get parent directory of each of $dir and $fullPath
     #
-    $dir      =~ s{/[^/]*$}{};
+    # print("pathCreate: dir = $dir, fullPath = $fullPath\n");
+    $dir      =~ s{/([^/]*)$}{};
+    my $file  = $bpc->fileNameUnmangle($1);
     $fullPath =~ s{/[^/]*$}{};
-    return if ( -d $fullPath );
+    return if ( -d $fullPath || $file eq "" );
     mkpath($fullPath, 0, 0777);
     $Attrib{$dir} = BackupPC::Attrib->new({ compress => $Compress })
                                 if ( !defined($Attrib{$dir}) );
+    # print("pathCreate: adding file = $file to dir = $dir\n");
     $Attrib{$dir}->set($file, {
                             type  => BPC_FTYPE_DIR,
                             mode  => 0755,


--
"When we try to pick out anything by itself, we find it
 connected to the entire universe"            John Muir

Chris "Ski" Kacoroski, [EMAIL PROTECTED], 206-501-9803


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Reply via email to