X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2Fbin%2Ffreeside-daily;h=ae71112ddba1f62a1df351308716633f7e14cfc4;hb=fc9e97f6cab72de473288470c0681534caf25ea5;hp=99d95d5d2ca0196e058f7c9e4a80c88dcb6f9455;hpb=2041a9143fac20b79ead4a1ae01224dedf5b27c2;p=freeside.git diff --git a/FS/bin/freeside-daily b/FS/bin/freeside-daily index 99d95d5d2..ae71112dd 100755 --- a/FS/bin/freeside-daily +++ b/FS/bin/freeside-daily @@ -57,10 +57,8 @@ foreach $cust_main ( @cust_main ) { if ( driver_name eq 'Pg' ) { dbh->{AutoCommit} = 1; #so we can vacuum - foreach my $statement ( 'vacuum', 'vacuum analyze' ) { - my $sth = dbh->prepare($statement) or die dbh->errstr; - $sth->execute or die $sth->errstr; - } + my $sth = dbh->prepare('vacuum analyze') or die dbh->errstr; + $sth->execute or die $sth->errstr; } my $conf = new FS::Conf; @@ -81,9 +79,11 @@ if ( $dest ) { output => "/var/tmp/$database.gpg", recipient => $conf->config('dump-pgpid'), ); + chmod 0600, '/var/tmp/$database.gpg'; scp("/var/tmp/$database.gpg", $dest); unlink "/var/tmp/$database.gpg" or die $!; } else { + chmod 0600, '/var/tmp/$database.sql'; scp("/var/tmp/$database.sql", $dest); } unlink "/var/tmp/$database.sql" or die $!;