qubes.backup fix access to volume paths

This commit is contained in:
Bahtiar `kalkin-` Gadimov 2016-06-16 19:59:58 +02:00
parent 66f46d8a25
commit 0a471e719b
No known key found for this signature in database
GPG Key ID: 96ED3C3BA19C3DEE

View File

@ -340,8 +340,11 @@ class Backup(object):
subdir = None subdir = None
vm_files = [] vm_files = []
if vm.private_img is not None: # TODO this is file pool specific. Change it to a more general
vm_files.append(self.FileToBackup(vm.private_img, subdir)) # solution
if vm.volumes['private'] is not None:
path_to_private_img = vm.volumes['private'].vid
vm_files.append(self.FileToBackup(path_to_private_img, subdir))
vm_files.append(self.FileToBackup(vm.icon_path, subdir)) vm_files.append(self.FileToBackup(vm.icon_path, subdir))
vm_files.extend(self.FileToBackup(i, subdir) vm_files.extend(self.FileToBackup(i, subdir)
@ -353,7 +356,10 @@ class Backup(object):
vm_files.append(self.FileToBackup(firewall_conf, subdir)) vm_files.append(self.FileToBackup(firewall_conf, subdir))
if vm.updateable: if vm.updateable:
vm_files.append(self.FileToBackup(vm.root_img, subdir)) # TODO this is file pool specific. Change it to a more general
# solution
path_to_root_img = vm.volumes['root'].vid
vm_files.append(self.FileToBackup(path_to_root_img, subdir))
files_to_backup[vm.qid] = self.VMToBackup(vm, vm_files, subdir) files_to_backup[vm.qid] = self.VMToBackup(vm, vm_files, subdir)
# Dom0 user home # Dom0 user home