summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
Diffstat (limited to 'hosts')
-rwxr-xr-xhosts/vidhar/borg/copy.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/hosts/vidhar/borg/copy.py b/hosts/vidhar/borg/copy.py
index be890cf1..37f7ff04 100755
--- a/hosts/vidhar/borg/copy.py
+++ b/hosts/vidhar/borg/copy.py
@@ -145,11 +145,11 @@ def copy_archive(src_repo_path, dst_repo_path, entry):
145 else: 145 else:
146 print(f'{total_files} files, {naturalsize(total_size, binary=True)}', file=stderr) 146 print(f'{total_files} files, {naturalsize(total_size, binary=True)}', file=stderr)
147 # print(f'Mounting to {dir}', file=stderr) 147 # print(f'Mounting to {dir}', file=stderr)
148 subprocess.run(['stat', dir], check=True)
149 with subprocess.Popen(['borg', 'mount', '--foreground', '--progress', '--lock-wait=600', f'{src_repo_path}::{entry["name"]}', dir], preexec_fn=lambda: as_borg()) as mount_proc: 148 with subprocess.Popen(['borg', 'mount', '--foreground', '--progress', '--lock-wait=600', f'{src_repo_path}::{entry["name"]}', dir], preexec_fn=lambda: as_borg()) as mount_proc:
150 with Halo(text='Waiting for mount', **halo_args) as sp: 149 with Halo(text='Waiting for mount', **halo_args) as sp:
151 wait_start = datetime.now() 150 wait_start = datetime.now()
152 while True: 151 while True:
152 subprocess.run(['mount'], check=True)
153 ret = subprocess.run(['mountpoint', '-q', dir]) 153 ret = subprocess.run(['mountpoint', '-q', dir])
154 if ret.returncode == 0: 154 if ret.returncode == 0:
155 break 155 break