[freeside-commits] freeside/FS/FS/Cron backup.pm,1.4,1.4.2.1
Ivan,,,
ivan at wavetail.420.am
Mon Jan 10 09:45:45 PST 2011
Update of /home/cvs/cvsroot/freeside/FS/FS/Cron
In directory wavetail.420.am:/tmp/cvs-serv3914
Modified Files:
Tag: FREESIDE_2_1_BRANCH
backup.pm
Log Message:
use -Fc format to dump Pg databases
Index: backup.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Cron/backup.pm,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -w -d -r1.4 -r1.4.2.1
--- backup.pm 28 Oct 2010 22:57:08 -0000 1.4
+++ backup.pm 10 Jan 2011 17:45:43 -0000 1.4.2.1
@@ -19,7 +19,7 @@
eval "use Net::SCP qw(scp);";
die $@ if $@;
if ( driver_name eq 'Pg' ) {
- system("pg_dump $database >/var/tmp/$database.sql")
+ system("pg_dump -Fc $database >/var/tmp/$database.Pg")
} else {
die "database dumps not yet supported for ". driver_name;
}
@@ -27,7 +27,7 @@
eval 'use GnuPG;';
die $@ if $@;
my $gpg = new GnuPG;
- $gpg->encrypt( plaintext => "/var/tmp/$database.sql",
+ $gpg->encrypt( plaintext => "/var/tmp/$database.Pg",
output => "/var/tmp/$database.gpg",
recipient => $conf->config('dump-pgpid'),
);
@@ -35,10 +35,10 @@
scp("/var/tmp/$database.gpg", "$dest.gpg");
unlink "/var/tmp/$database.gpg" or die $!;
} else {
- chmod 0600, '/var/tmp/$database.sql';
- scp("/var/tmp/$database.sql", "$dest.sql");
+ chmod 0600, '/var/tmp/$database.Pg';
+ scp("/var/tmp/$database.Pg", "$dest.Pg");
}
- unlink "/var/tmp/$database.sql" or die $!;
+ unlink "/var/tmp/$database.Pg" or die $!;
}
}
More information about the freeside-commits
mailing list