add a subprocess to restore the archive
This commit is contained in:
parent
593e9533e5
commit
63ecac68c3
|
@ -2,6 +2,7 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import configparser
|
import configparser
|
||||||
|
import subprocess
|
||||||
|
|
||||||
chosen_activity = None
|
chosen_activity = None
|
||||||
mount_point = None
|
mount_point = None
|
||||||
|
@ -63,8 +64,11 @@ while chosen_activity != 0:
|
||||||
working_directory = os.system('pwd')
|
working_directory = os.system('pwd')
|
||||||
if not os.path.exists(restore_path):
|
if not os.path.exists(restore_path):
|
||||||
os.makedirs(restore_path)
|
os.makedirs(restore_path)
|
||||||
os.chdir(restore_path)
|
p = subprocess.Popen(['borg', 'extract' '-v' '--list' '::'
|
||||||
os.system('borg extract -v --list ::'+ archive_name)
|
+ archive_name]
|
||||||
|
, cwd=restore_path)
|
||||||
|
p.wait()
|
||||||
|
os.system(''+ archive_name)
|
||||||
os.system(working_directory)
|
os.system(working_directory)
|
||||||
elif chosen_activity == 0:
|
elif chosen_activity == 0:
|
||||||
if (not mount_point):
|
if (not mount_point):
|
||||||
|
|
Reference in New Issue