Closed ghan1t closed 7 months ago
Could you try with a shorter zfs property name? I couldn't run it once with a long property. And you're target goes to a pool directly, not into a dataset? This error could be caused by my script setting the args into sys.argv and then calling the cli method of zfs-autobackup. Maybe some parameters are not parsed correctly. I'll try to make some experiments.
And you're target goes to a pool directly, not into a dataset?
Yes, backup target is the pool itself, not a dataset underneath. It works with zfs-autobackup in general but not in combination with your udev trigger script
Could you try with a shorter zfs property name?
I will try as soon as possible
Hey ghan1t, setting the option --set-properties does not seem to work with your script. This time I wanted to set the property keylocation=none by using the switch --set-properties keylocation=none. Same error like using --set-properties readlonly=on in second run but this time I have got different errors on first run. You can find the logfiles in the attachment
log_secondrun.txt log_firstrun.txt
Probably the parsing problem you assumed?
and a shorter zfs property name does not help. Same error with zfs property name "bck" for example.
@wolmeh it's again the only parameter with a space, that's probably the reason. I have never tested that before. Will have a look.
Hi @wolmeh I have found the reason. zfs-autobackup expects '--set-property readonly=on' as two parameters passed on the cli and not as one parameter with a space. You can do this in the config this way:
@wolmeh I made it configurable. It splits parameters by default. Run trigger.sh --update to get the newest version.
If I use the option -- set-properties readonly=on (did not test other set-properties options) with your script, zfs-autobackup will not recognize backup-name and target-path arguments. It works with standalone zfs-autobackup command.
https://www.truenas.com/community/threads/udev-trigger-zfs-autobackup-to-removable-disk-offsite-backup.100570/post-803248
zfs-autobackup-n -v -d --strip-path=1 --allow-empty --clear-mountpoint --set-properties readonly=on --keep-source=10,1d1w,1w1m,1m1y --keep-target=10,1d1w,1w1m,1m1y testbackup2 testbackup2 zfs-autobackup: error: unrecognized arguments: testbackup2 testbackup2
log2.txt