From: Eric Bollengier Date: Tue, 16 Aug 2011 08:06:22 +0000 (+0200) Subject: Adapt make_catalog_backup.pl for backend X-Git-Tag: Release-7.0.0~589 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=97f1ef4a3a22e8fbfe2ba50d975e35d4e1225001;p=bacula%2Fbacula Adapt make_catalog_backup.pl for backend --- diff --git a/bacula/src/cats/make_catalog_backup.pl.in b/bacula/src/cats/make_catalog_backup.pl.in index 9bb6b7c98f..b8f7e1eaad 100644 --- a/bacula/src/cats/make_catalog_backup.pl.in +++ b/bacula/src/cats/make_catalog_backup.pl.in @@ -41,8 +41,6 @@ use strict; =cut -$ENV{PATH}="@SQL_BINDIR@:$ENV{PATH}"; - my $cat = shift or die "Usage: $0 catalogname"; my $dir_conf='@sbindir@/dbcheck -B -c @sysconfdir@/bacula-dir.conf'; my $wd = "@working_dir@"; @@ -122,13 +120,14 @@ password=$args{db_password} sub dump_catalog { my %args = @_; - if ($args{db_type} eq 'SQLite') { - dump_sqlite(%args); - } elsif ($args{db_type} eq 'SQLite3') { + if ($args{db_type} eq 'SQLite3') { + $ENV{PATH}="@SQLITE_BINDIR@:$ENV{PATH}"; dump_sqlite3(%args); } elsif ($args{db_type} eq 'PostgreSQL') { + $ENV{PATH}="@POSTGRESQL_BINDIR@:$ENV{PATH}"; dump_pgsql(%args); } elsif ($args{db_type} eq 'MySQL') { + $ENV{PATH}="@MYSQL_BINDIR@:$ENV{PATH}"; dump_mysql(%args); } else { die "This database type isn't supported";