tasket / wyng-backup

Fast backups for logical volumes & disk images
GNU General Public License v3.0
251 stars 16 forks source link

Clearer error messages when dest is not ready #136

Closed keeperofdakeys closed 1 year ago

keeperofdakeys commented 1 year ago

When you pass a non-mountpoint to an internal destination with arch-init, wyng currently accepts it without error. However any operation after that will exit with a non-descriptive error.

[root@host wyng-backup]# ~/app/wyng-backup/wyng arch-init --local=vg1/thinpool --dest=internal:/mnt/storage/backups
Wyng 0.3.6 release 20230221
Compression = zstd:3
Hashing = blake2b
Done.
[root@host wyng-backup]# ~/app/wyng-backup/wyng arch-check
Wyng 0.3.6 release 20230221
Destination not ready to receive commands.

I've been working on and off for the last few days to get wyng working, and this vague error had me thinking I was using the program in the totally wrong way. This seems like a big UX issue to me.

I'd suggest two changes here. First arch-init should check (or initialise) the destination, which will provide more feedback that bad settings were provided to arch-init. Second the error should be more descriptive, like returning "Mountpoint not found" if the mountpoint doesn't exist. (I Know this is a little challenging due to the support of multiple backends).

It might be even better if the script could figure out the correct mount point given a directory, I know this is possible with findmnt -T dir. However this may not be very portable to other distros.

tasket commented 1 year ago

Thanks for the feedback on this. Since v0.4 is doing away with the mountpoint requirement altogether this particular issue is moot. However, the remote status function could still be more informative in general (such as outputing the stdout of the remote script).