[freeside-commits] branch FREESIDE_4_BRANCH updated. 70877d564009919054ca785c5b8f756f0e81691a
Ivan
ivan at 420.am
Mon Mar 6 21:33:29 PST 2017
The branch, FREESIDE_4_BRANCH has been updated
via 70877d564009919054ca785c5b8f756f0e81691a (commit)
from 9886f9a440019c5424cec7fc254c9dcc777798f5 (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 70877d564009919054ca785c5b8f756f0e81691a
Author: Ivan Kohler <ivan at freeside.biz>
Date: Mon Mar 6 21:33:28 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 a192ca9..7d868c8 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_log_and_die($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_log_and_die($filename, $scp->{errstr});
}
unlink "/var/tmp/$database.$ext" or backup_log_and_die($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