[freeside-commits] branch FREESIDE_3_BRANCH updated. da5b18b44fd8f953832a9985602cdd69e81bafb0
Ivan
ivan at 420.am
Mon Mar 6 21:33:39 PST 2017
The branch, FREESIDE_3_BRANCH has been updated
via da5b18b44fd8f953832a9985602cdd69e81bafb0 (commit)
from 5efeb63e2fcbbb864278a86bcc4663d4d533eb32 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit da5b18b44fd8f953832a9985602cdd69e81bafb0
Author: Ivan Kohler <ivan at freeside.biz>
Date: Mon Mar 6 21:33:37 2017 -0800
detect errors on the scp portion of the backup, RT#74914
diff --git a/FS/FS/Cron/backup.pm b/FS/FS/Cron/backup.pm
index cfc8e36..6e172ae 100644
--- a/FS/FS/Cron/backup.pm
+++ b/FS/FS/Cron/backup.pm
@@ -58,7 +58,9 @@ sub backup {
if ( $scpdest ) {
eval "use Net::SCP qw(scp);";
backup_email_and_die($conf,$filename,$@) if $@;
- scp("/var/tmp/$database.$ext", "$scpdest/$filename.$ext");
+ my $scp = new Net::SCP;
+ $scp->scp("/var/tmp/$database.$ext", "$scpdest/$filename.$ext")
+ or backup_email_and_die($conf, $filename, $scp->{errstr});
}
unlink "/var/tmp/$database.$ext" or backup_email_and_die($conf,$filename,$!); #or just warn?
-----------------------------------------------------------------------
Summary of changes:
FS/FS/Cron/backup.pm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
More information about the freeside-commits
mailing list