From: Moritz Bunkus Date: Fri, 18 May 2007 12:50:29 +0000 (+0000) Subject: Bei pg_dump das tar-Format benutzen, weil pg_restore nur damit zurechtkommt. X-Git-Tag: release-2.4.3^2~286 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=2d4601b1915ab0582b6c8eaa65eba87eccb96106;p=kivitendo-erp.git Bei pg_dump das tar-Format benutzen, weil pg_restore nur damit zurechtkommt. --- diff --git a/bin/mozilla/admin.pl b/bin/mozilla/admin.pl index 6e9f2020e..9805417cd 100644 --- a/bin/mozilla/admin.pl +++ b/bin/mozilla/admin.pl @@ -757,12 +757,12 @@ sub backup_dataset_start { $ENV{HOME} = $tmpdir; - my @args = ("-c", "-o", "-h", $form->{dbhost}, "-U", $form->{dbuser}); + my @args = ("-Ft", "-c", "-o", "-h", $form->{dbhost}, "-U", $form->{dbuser}); push @args, ("-p", $form->{dbport}) if ($form->{dbport}); push @args, $form->{dbname}; my $cmd = "${pg_dump_exe} " . join(" ", map { s/\\/\\\\/g; s/\"/\\\"/g; $_ } @args); - my $name = "dataset_backup_$form->{dbname}_" . strftime("%Y%m%d", localtime()) . ".sql.gz"; + my $name = "dataset_backup_$form->{dbname}_" . strftime("%Y%m%d", localtime()) . ".tar"; if ($form->{destination} ne "email") { my $in = IO::File->new("$cmd |"); @@ -774,7 +774,7 @@ sub backup_dataset_start { $form->error($locale->text('The pg_dump process could not be started.')); } - print "content-type: application/octet-stream\n"; + print "content-type: application/x-tar\n"; print "content-disposition: attachment; filename=\"${name}\"\n\n"; while (my $line = <$in>) {