blob: dc1323bb329ff162c558c1d50cba34d22df18534 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
<%
if ( driver_name =~ /^Pg$/ ) {
my $dbname = (split(':', datasrc))[2];
if ( $dbname =~ /[;=]/ ) {
my %elements = map { /^(\w+)=(.*)$/; $1=>$2 } split(';', $dbname);
$dbname = $elements{'dbname'};
}
open(DUMP,"pg_dump $dbname |");
} else {
eidiot "don't (yet) know how to dump ". driver_name. " databases\n";
}
http_header('Content-Type' => 'text/plain' );
while (<DUMP>) {
print $_;
}
close DUMP;
%>
|