Revision 2d4601b1
Von Moritz Bunkus vor mehr als 17 Jahren hinzugefügt
bin/mozilla/admin.pl | ||
---|---|---|
757 | 757 |
|
758 | 758 |
$ENV{HOME} = $tmpdir; |
759 | 759 |
|
760 |
my @args = ("-c", "-o", "-h", $form->{dbhost}, "-U", $form->{dbuser}); |
|
760 |
my @args = ("-Ft", "-c", "-o", "-h", $form->{dbhost}, "-U", $form->{dbuser});
|
|
761 | 761 |
push @args, ("-p", $form->{dbport}) if ($form->{dbport}); |
762 | 762 |
push @args, $form->{dbname}; |
763 | 763 |
|
764 | 764 |
my $cmd = "${pg_dump_exe} " . join(" ", map { s/\\/\\\\/g; s/\"/\\\"/g; $_ } @args); |
765 |
my $name = "dataset_backup_$form->{dbname}_" . strftime("%Y%m%d", localtime()) . ".sql.gz";
|
|
765 |
my $name = "dataset_backup_$form->{dbname}_" . strftime("%Y%m%d", localtime()) . ".tar";
|
|
766 | 766 |
|
767 | 767 |
if ($form->{destination} ne "email") { |
768 | 768 |
my $in = IO::File->new("$cmd |"); |
... | ... | |
774 | 774 |
$form->error($locale->text('The pg_dump process could not be started.')); |
775 | 775 |
} |
776 | 776 |
|
777 |
print "content-type: application/octet-stream\n";
|
|
777 |
print "content-type: application/x-tar\n";
|
|
778 | 778 |
print "content-disposition: attachment; filename=\"${name}\"\n\n"; |
779 | 779 |
|
780 | 780 |
while (my $line = <$in>) { |
Auch abrufbar als: Unified diff
Bei pg_dump das tar-Format benutzen, weil pg_restore nur damit zurechtkommt.