[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[3306] trunk/LedgerSMB/AM.pm
- Subject: SF.net SVN: ledger-smb:[3306] trunk/LedgerSMB/AM.pm
- From: ..hidden..
- Date: Mon, 20 Jun 2011 23:53:31 +0000
Revision: 3306
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3306&view=rev
Author: einhverfr
Date: 2011-06-20 23:53:31 +0000 (Mon, 20 Jun 2011)
Log Message:
-----------
Adusting patch for Luke's backup issue for 1.3
Modified Paths:
--------------
trunk/LedgerSMB/AM.pm
Modified: trunk/LedgerSMB/AM.pm
===================================================================
--- trunk/LedgerSMB/AM.pm 2011-06-20 23:48:45 UTC (rev 3305)
+++ trunk/LedgerSMB/AM.pm 2011-06-20 23:53:31 UTC (rev 3306)
@@ -1962,9 +1962,10 @@
$t[3] = substr( "0$t[3]", -2 );
$t[4] = substr( "0$t[4]", -2 );
+ my $globalDBname = $myconfig->{dbname};
my $boundary = time;
my $tmpfile =
-"${LedgerSMB::Sysconfig::backuppath}/$boundary.$globalDBname-$form->{dbversion}-$t[5]$t[4]$t[3].sql";
+"${LedgerSMB::Sysconfig::backuppath}/$boundary.$globalDBname-$form->{dbversion}-$t[5]$t[4]$t[3].sqlc";
$form->{OUT} = "$tmpfile";
open( OUT, '>:raw', "$form->{OUT}" ) or $form->error("$form->{OUT} : $!");
@@ -1973,8 +1974,6 @@
my $today = scalar localtime;
- # compress backup if gzip defined
- my $suffix = "c";
##SC: START Testing changes
$myconfig->{name} = "test";
@@ -1992,7 +1991,7 @@
$mail = new LedgerSMB::Mailer(
to => qq|"$myconfig->{name}" <$myconfig->{email}>|,
from => qq|"$myconfig->{name}" <$myconfig->{email}>|,
- subject => "LedgerSMB Backup / $globalDBname-$form->{dbversion}-$t[5]$t[4]$t[3].sql$suffix",
+ subject => "LedgerSMB Backup / $globalDBname-$form->{dbversion}-$t[5]$t[4]$t[3].sqlc",
message => qq|
This PostgreSQL backup can be restored using the pg_restore command.
@@ -2017,7 +2016,7 @@
binmode( OUT, ':raw' );
print OUT qq|Content-Type: application/file;\n|
- . qq|Content-Disposition: attachment; filename="$myconfig->{dbname}-$form->{dbversion}-$t[5]$t[4]$t[3].sql$suffix"\n\n|;
+ . qq|Content-Disposition: attachment; filename="$myconfig->{dbname}-$form->{dbversion}-$t[5]$t[4]$t[3].sqlc"\n\n|;
print OUT
qx(PGPASSWORD="$myconfig->{dbpasswd}" pg_dump -U $myconfig->{dbuser} -h $myconfig->{dbhost} -Fc -p $myconfig->{dbport} $myconfig->{dbname});
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.