diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-02-18 12:35:25 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-02-18 12:35:25 +0100 |
commit | 37d57ee8ebd510d51e5962611023ceaaa4b6d562 (patch) | |
tree | decea88f7e04e378d2ef9c331e1a60b4b5b23305 | |
parent | 65b93ec8b7c935bc1beb11a9b4e2b852c7df11ce (diff) | |
download | nixos-37d57ee8ebd510d51e5962611023ceaaa4b6d562.tar nixos-37d57ee8ebd510d51e5962611023ceaaa4b6d562.tar.gz nixos-37d57ee8ebd510d51e5962611023ceaaa4b6d562.tar.bz2 nixos-37d57ee8ebd510d51e5962611023ceaaa4b6d562.tar.xz nixos-37d57ee8ebd510d51e5962611023ceaaa4b6d562.zip |
vidhar: ...
-rwxr-xr-x | hosts/vidhar/borg/copy.py | 2 |
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 |