First I want to thank the developers of BackupPC for creating such a
effective and easy to use backup solution. I just started using the
3.1.0 version, was very impressed. However, after a while, I wanted to
move to location where the backup data was stored to a larger partition,
I found what I believe to be a bug in the tool.
The 2 pool directories are assigned values based on either the default
value of topDir, or the value passed into the new method of
BackupPC::Lib, but before the config.pl file is read.
When I edited config.pl to change the location of TopDir, the values of
the pool directories never got changed, but the other key directories
did. The result is that the individual machine backups ended up on a
different physical partition than the pools, so the link step failed
dramatically, generated thousands of messages of the form:
BackupPC_link got error -4 when calling MakeFileLink(<file_path>,
<hash>, 1)
The attached patch for the BackupPC/lib/BackupPC/Lib.pm file fixes the
problem by moving the assignment of $bpc->{PoolDir} and $bpc->{CPoolDir}
to after config.pl is read and TopDir is reassigned.
Thanks again for a great tool!
- Tim
diff -up BackupPC/lib/BackupPC/Lib.pm.mitre BackupPC/lib/BackupPC/Lib.pm
--- BackupPC/lib/BackupPC/Lib.pm.mitre 2008-04-16 17:39:09.000000000 -0400
+++ BackupPC/lib/BackupPC/Lib.pm 2008-04-16 17:40:09.000000000 -0400
@@ -152,8 +152,6 @@ sub new
# Clean up %ENV and setup other variables.
#
delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
- $bpc->{PoolDir} = "$bpc->{TopDir}/pool";
- $bpc->{CPoolDir} = "$bpc->{TopDir}/cpool";
if ( defined(my $error = $bpc->ConfigRead()) ) {
print(STDERR $error, "\n");
return;
@@ -167,6 +165,8 @@ sub new
$paths->{$dir} = $bpc->{$dir} = $bpc->{Conf}{$dir};
}
$bpc->{storage}->setPaths($paths);
+ $bpc->{PoolDir} = "$bpc->{TopDir}/pool";
+ $bpc->{CPoolDir} = "$bpc->{TopDir}/cpool";
#
# Verify we are running as the correct user
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
BackupPC-devel mailing list
[email protected]
List: https://lists.sourceforge.net/lists/listinfo/backuppc-devel
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/