From b6627eb389daa2df0be86de3bc83faa178b60ad8 Mon Sep 17 00:00:00 2001 From: Edwin Eefting Date: Sat, 6 Feb 2021 22:22:38 +0100 Subject: [PATCH] add --no-progress to workaround zfs recv bug --- README.md | 3 ++- bin/zfs-autobackup | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 323a277..4d47a5b 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ zfs-autobackup tries to be the easiest to use backup tool for zfs. ## Features * Works across operating systems: Tested with **Linux**, **FreeBSD/FreeNAS** and **SmartOS**. +* Low learning curve: no complex daemons or services, no additional software or networking needed. (Only read this page) * Plays nicely with existing replication systems. (Like Proxmox HA) * Automatically selects filesystems to backup by looking at a simple ZFS property. (recursive) * Creates consistent snapshots. (takes all snapshots at once, atomicly.) @@ -391,7 +392,7 @@ To be bold I created 2500 datasets, but that also was no problem. So it seems it If you need more performance let me know. -NOTE: The is actually a performance regression in ZFS version 2: https://github.com/openzfs/zfs/issues/11560 (I commented out line 1652: '# args.progress = True' as temporary workaround) +NOTE: There is actually a performance regression in ZFS version 2: https://github.com/openzfs/zfs/issues/11560 Use --no-progress as workaround. #### Less work diff --git a/bin/zfs-autobackup b/bin/zfs-autobackup index 5ba6511..d4e0e60 100755 --- a/bin/zfs-autobackup +++ b/bin/zfs-autobackup @@ -1641,14 +1641,16 @@ class ZfsAutobackup: parser.add_argument('--debug-output', action='store_true', help='Show zfs commands and their output/exit codes. (noisy)') parser.add_argument('--progress', action='store_true', - help='show zfs progress output (to stderr). Enabled by default on ttys.') + help='show zfs progress output. Enabled automaticly on ttys. (use --no-progress to disable)') + parser.add_argument('--no-progress', action='store_true', help=argparse.SUPPRESS) #needed to workaround a zfs recv -v bug # note args is the only global variable we use, since its a global readonly setting anyway args = parser.parse_args(argv) self.args = args - if sys.stderr.isatty(): + #auto enable progress? + if sys.stderr.isatty() and not args.no_progress: args.progress = True if args.debug_output: