From a4d06858b6f0a0d728f50a6cd8d5f3ffed08aea2 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Tue, 16 Aug 2011 10:06:22 +0200 Subject: [PATCH] Adapt make_catalog_backup.pl for backend --- bacula/src/cats/make_catalog_backup.pl.in | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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"; -- 2.39.5