Joe Krahn wrote:
> It seems to be a known problem that moving the backup location by
> setting $Conf{TopDir} does not work, because it is used to define the
> location of config.pl when $useFHS is off. But, changing $TopDir breaks
> BackupPC_link even when $useFHS is on. It is confusing that the config
> value is used some places, but the default value is used in others.
> 
> If certain values have to be hard-coded, then you shouldn't also allow
> those as configuration options. There is also no reason to force the
> backup pool to be in the same location as the config file, because it
> will be quite common to have a separate filesystem for backup data, so
> the backup locations should definitely not be one of the hard-coded items.
> 
> Since BackupPC is designed to run with a backuppc account, you could
> require that the backuppc home directory be the config.pl location, and
> then you wouldn't need any hard-coded paths.
> 
> Joe Krahn
> 
(More info)
Here is where the pool and cpool paths are set in Lib.pm:

    #
    # 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;
    }

    #
    # Update the paths based on the config file
    #
    foreach my $dir ( qw(TopDir ConfDir InstallDir LogDir) ) {
        next if ( $bpc->{Conf}{$dir} eq "" );
        $paths->{$dir} = $bpc->{$dir} = $bpc->{Conf}{$dir};
    }
    $bpc->{storage}->setPaths($paths);


Wouldn't the $TopDir value work correctly for PoolDir and CPoolDir if
they were set after reading the config?

Joe

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
BackupPC-users mailing list
[email protected]
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

Reply via email to