From 0a471e719b7e4df286ccaa656fe36979d8f807c4 Mon Sep 17 00:00:00 2001 From: Bahtiar `kalkin-` Gadimov Date: Thu, 16 Jun 2016 19:59:58 +0200 Subject: [PATCH] qubes.backup fix access to volume paths --- qubes/backup.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/qubes/backup.py b/qubes/backup.py index 7e3f0193..57ab6a19 100644 --- a/qubes/backup.py +++ b/qubes/backup.py @@ -340,8 +340,11 @@ class Backup(object): subdir = None vm_files = [] - if vm.private_img is not None: - vm_files.append(self.FileToBackup(vm.private_img, subdir)) + # TODO this is file pool specific. Change it to a more general + # 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.extend(self.FileToBackup(i, subdir) @@ -353,7 +356,10 @@ class Backup(object): vm_files.append(self.FileToBackup(firewall_conf, subdir)) 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) # Dom0 user home