qvm-backup: dom0 dst relative to cwd of tool, not qubesd

This commit is contained in:
Rusty Bird 2021-02-02 19:05:12 +00:00
parent 0f42fd0580
commit e78512b4b1
No known key found for this signature in database
GPG Key ID: 469D78F47AAF2ADF

View File

@ -103,11 +103,13 @@ def write_backup_profile(output_stream, args, passphrase=None):
if passphrase: if passphrase:
profile_data['passphrase_text'] = passphrase profile_data['passphrase_text'] = passphrase
profile_data['compression'] = args.compression profile_data['compression'] = args.compression
if args.appvm: if args.appvm and args.appvm != 'dom0':
profile_data['destination_vm'] = args.appvm profile_data['destination_vm'] = args.appvm
profile_data['destination_path'] = args.backup_location
else: else:
profile_data['destination_vm'] = 'dom0' profile_data['destination_vm'] = 'dom0'
profile_data['destination_path'] = args.backup_location profile_data['destination_path'] = os.path.join(
os.getcwd(), args.backup_location)
yaml.safe_dump(profile_data, output_stream) yaml.safe_dump(profile_data, output_stream)