summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/upgrade.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/upgrade.py b/scripts/upgrade.py
index ac71ee2..088647c 100644
--- a/scripts/upgrade.py
+++ b/scripts/upgrade.py
@@ -90,11 +90,12 @@ class Container:
def sysupgrade_backup(self, ):
return self.execute_with_output(['sysupgrade', '-b', '-'],
- decode=False)
+ encoding='raw', decode=False)
def sysupgrade_restore(self, data):
- self.execute(['sysupgrade', '-r', '-'],
- stdin_payload=data, decode=False)
+ backup_file = '/tmp/lxd-upgrade.tar.gz'
+ self.files.put(backup_file, data)
+ self.execute(['sysupgrade', '-r', backup_file])
def opkg_list_installed(self, ):
return self.execute_with_output(['opkg', 'list-installed'])