tasket / wyng-backup

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

arch-init command in 04alpha2: qubes://... destination location is not saved #121

Closed gasull closed 2 years ago

gasull commented 2 years ago
$ sudo ./wyng arch-init --local=myvg/mypool --dest qubes://admin-backups/media/backups/wyng/ --encrypt=xchacha20-poly1305 --verbose 
Wyng 0.4.0alpha2 release 20220903
Enter passphrase: 
Re-enter passphrase: 

Encryption    : xchacha20-poly1305
Hashing       : blake2b
Compression   : zstd:3
Encrypted archive last updated 2022-10-31 04:15:43.381502 (+00:00)

Dest location: qubes://admin-backups/media/backups/wyng/
$ sudo ./wyng arch-check
Wyng 0.4.0alpha2 release 20220903
Error: Missing dest specification.
tasket commented 2 years ago

Hi @gasull. The Readme could perhaps be clearer about this change... alpha2 introduces a requirement to specify the location of an archive for all actions unless dest name 'default' was previously defined. So you can do sudo ./wyng arch-check --dest qubes://admin-backups/media/backups/wyng/ -n default (or other action besides arch-check) and then subsequent invocations of sudo ./wyng arch-check will work.

gasull commented 2 years ago

I get an exception when I follow your suggestion.

$ sudo ./wyng arch-check --dest qubes://admin-backups/media/backups/wyng/ -n default
Wyng 0.4.0alpha2 release 20220903
Traceback (most recent call last):
  File "/home/user/Downloads/wyng-backup/./wyng", line 3348, in <module>
    aset, dest  = get_configs(options)
  File "/home/user/Downloads/wyng-backup/./wyng", line 1086, in get_configs
    dest = Destination(opts.from_arch if opts.from_arch else opts.dest, opts.dest_name)
  File "/home/user/Downloads/wyng-backup/./wyng", line 1224, in __init__
    locs[dname] = opts.dest
NameError: name 'opts' is not defined
gasull commented 2 years ago

I created a new issue and pull request for the second exception, and another pull request to update the README.