Yes, the --config-dir option to configure.pl should override the fhs
default of /etc/BackupPC.

Assuming configure.pl runs successfully, it modifies lib/BackupPC/Lib.pm
and replaces __CONFDIR__ (and also __TOPDIR__, __INSTALLDIR__ etc) with
whatever was configured.  So look near the top of that file to see what
settings ended up there.  Presumably it is incorrectly set to
/etc/BackupPC, so something didn't work correct.  All the other BackupPC
programs inherit the values from there - there are no command-line options
to override.

Craig


On Mon, Oct 5, 2020 at 8:31 AM PGNet Dev <pgnet....@gmail.com> wrote:

> installing BackupPC 4.4.0, i setup with an alternate config dir
>
>         perl configure.pl --batch \
>          --config-dir /usr/local/etc/backuppc \
>          ...
>
> my configs are
>
>         ls -al /usr/local/etc/backuppc/{*,*/*}pl
>                 -rw-r----- 1 wwwrun www  87K Oct  3 21:35
> /usr/local/etc/backuppc/config.pl
>                 -rw-r----- 1 wwwrun www 3.5K Oct  5 07:14
> /usr/local/etc/backuppc/pc/localhost.pl
>
> when I start the CGI
>
>         systemd start backuppc
>
> it fails
>
>         logs
>                 Oct 05 08:12:45 test systemd[1]: Started BackupPC server.
>                 Oct 05 08:12:45 test BackupPC[3316]: No language setting
>                 Oct 05 08:12:45 test BackupPC[3316]: BackupPC::Lib->new
> failed
>                 Oct 05 08:12:45 test systemd[1]: backuppc.service: Main
> process exited, code=exited, status=2/INVALIDARGUMENT
>                 Oct 05 08:12:45 test systemd[1]: backuppc.service: Failed
> with result 'exit-code'.
>
>
> simply
>
>         ln -sf /usr/local/etc/backuppc /etc/BackupPC
>
> cures the problem
>
>         systemd start backuppc
>
>
>         logs
>                 Oct 05 08:16:28 test systemd[1]: Started BackupPC server.
>
>         ps ax | grep -i backuppc
>                 3353 ?        Ss     0:00 /usr/bin/perl
> /usr/local/BackupPC/bin/BackupPC
>
> i understand that "--fhs" defaults to config location under
> '/etc/BackupPC', but reading
>
>
> https://backuppc.github.io/backuppc/BackupPC.html#Configuration-File
>
> &
>
>
> https://backuppc.github.io/backuppc/BackupPC.html#Config-and-Log-Directories
>
> expected that the @ configure.pl override would be respected.
>
> looking in
>
>         bin/BackupPC
>
> the only mentioned cmd line options is "d"
>
>         ...
>
> ###########################################################################
>         # Handle command line options
>
> ###########################################################################
>         my %opts;
>         if ( !getopts("d", \%opts) || @ARGV != 0 ) {
>                 print(STDERR "usage: $0 [-d]\n");
>                 exit(1);
>         }
>
>
> ###########################################################################
>         ...
>
>
> what/where do i need to config to correctly point BackupPC at the intended
> config-dir = /usr/local/etc/backuppc
>
>
>
> _______________________________________________
> BackupPC-users mailing list
> BackupPC-users@lists.sourceforge.net
> List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
> Wiki:    https://github.com/backuppc/backuppc/wiki
> Project: https://backuppc.github.io/backuppc/
>
_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/

Reply via email to