From b1dd2b55f890cbd9d655e1906091f1ad33109052 Mon Sep 17 00:00:00 2001 From: Edwin Eefting Date: Tue, 17 Mar 2020 19:55:16 +0100 Subject: [PATCH] improved error logging --- README.md | 4 +++- bin/zfs-autobackup | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 585ea13..c7c8af0 100644 --- a/README.md +++ b/README.md @@ -67,9 +67,11 @@ zfs-autobackup tries to be the easiest to use backup tool for zfs. The recommended way on most servers is to use pip: ```console -[root@server ~]# pip install zfs-autobackup +[root@server ~]# pip install --upgrade zfs-autobackup ``` +This can also be used to upgrade zfs-autobackup to the newest stable version. + ### Using easy_install On older servers you might have to use easy_install diff --git a/bin/zfs-autobackup b/bin/zfs-autobackup index 833ac96..bcc11f0 100755 --- a/bin/zfs-autobackup +++ b/bin/zfs-autobackup @@ -961,6 +961,7 @@ class ZfsDataset(): #check if transfer was really ok (exit codes have been wrong before due to bugs in zfs-utils and can be ignored by some parameters) if not self.exists: + self.error("doesnt exist") raise(Exception("Target doesnt exist after transfer, something went wrong.")) # if args.buffer and args.ssh_target!="local": @@ -1550,7 +1551,7 @@ class ZfsAutobackup: source_dataset.sync_snapshots(target_dataset, show_progress=self.args.progress, resume=self.args.resume, filter_properties=filter_properties, set_properties=set_properties, ignore_recv_exit_code=self.args.ignore_transfer_errors, source_holds= not self.args.no_holds, rollback=self.args.rollback, raw=self.args.raw, other_snapshots=self.args.other_snapshots, no_send=self.args.no_send) except Exception as e: fail_count=fail_count+1 - source_dataset.error("DATASET FAILED: "+str(e)) + self.error("DATASET FAILED: "+str(e)) if self.args.debug: raise