improved error logging

This commit is contained in:
Edwin Eefting 2020-03-17 19:55:16 +01:00
parent 4ed53eb03f
commit b1dd2b55f8
2 changed files with 5 additions and 2 deletions

View File

@ -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: The recommended way on most servers is to use pip:
```console ```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 ### Using easy_install
On older servers you might have to use easy_install On older servers you might have to use easy_install

View File

@ -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) #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: if not self.exists:
self.error("doesnt exist")
raise(Exception("Target doesnt exist after transfer, something went wrong.")) raise(Exception("Target doesnt exist after transfer, something went wrong."))
# if args.buffer and args.ssh_target!="local": # 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) 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: except Exception as e:
fail_count=fail_count+1 fail_count=fail_count+1
source_dataset.error("DATASET FAILED: "+str(e)) self.error("DATASET FAILED: "+str(e))
if self.args.debug: if self.args.debug:
raise raise