]> git.sur5r.net Git - bacula/bacula/commitdiff
Adapt make_catalog_backup.pl for backend
authorEric Bollengier <eric@eb.homelinux.org>
Tue, 16 Aug 2011 08:06:22 +0000 (10:06 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:50:00 +0000 (14:50 +0200)
bacula/src/cats/make_catalog_backup.pl.in

index 9bb6b7c98f2451d9f55a6b39a928b901b83db3b4..b8f7e1eaade1a63661400ef472ba4e291452f79b 100644 (file)
@@ -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";