From 5001af381b536062a5946d63fbfbf8a71c9957fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Courr=C3=A8ges-Anglas?= Date: Fri, 15 May 2015 11:49:34 +0200 Subject: [PATCH] On unknown error, log the last 256 bytes of rsync output ... else we're completely clueless about what actually happened. --- libtisbackup/backup_rsync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libtisbackup/backup_rsync.py b/libtisbackup/backup_rsync.py index 4885a08..21ded8c 100644 --- a/libtisbackup/backup_rsync.py +++ b/libtisbackup/backup_rsync.py @@ -186,7 +186,7 @@ class backup_rsync(backup_generic): self.logger.warning("[" + self.backup_name + "] unable so set uid on some files") elif (returncode != 0): self.logger.error("[" + self.backup_name + "] shell program exited with error code " + str(returncode)) - raise Exception("[" + self.backup_name + "] shell program exited with error code " + str(returncode), cmd) + raise Exception("[" + self.backup_name + "] shell program exited with error code " + str(returncode), cmd, log[-256:]) else: print cmd