summaryrefslogtreecommitdiff
path: root/hosts/vidhar/borg
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-02-17 17:08:05 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-02-17 17:08:05 +0100
commit8de2cd094454068ffbff6f27095ab914409e30fe (patch)
tree3fc7e11023aead572019ce9a7917af15f1b3bf0b /hosts/vidhar/borg
parent364db19d143c2f9fc6d2f346afa9c6d9cf6f719d (diff)
downloadnixos-8de2cd094454068ffbff6f27095ab914409e30fe.tar
nixos-8de2cd094454068ffbff6f27095ab914409e30fe.tar.gz
nixos-8de2cd094454068ffbff6f27095ab914409e30fe.tar.bz2
nixos-8de2cd094454068ffbff6f27095ab914409e30fe.tar.xz
nixos-8de2cd094454068ffbff6f27095ab914409e30fe.zip
vidhar: ...
Diffstat (limited to 'hosts/vidhar/borg')
-rwxr-xr-xhosts/vidhar/borg/copy.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/hosts/vidhar/borg/copy.py b/hosts/vidhar/borg/copy.py
index de62dfa5..96426682 100755
--- a/hosts/vidhar/borg/copy.py
+++ b/hosts/vidhar/borg/copy.py
@@ -125,6 +125,7 @@ def copy_archive(src_repo_path, dst_repo_path, entry):
125 bindMounts.append(pathlib.Path(os.environ['SSH_AUTH_SOCK']).parent.relative_to('/')) 125 bindMounts.append(pathlib.Path(os.environ['SSH_AUTH_SOCK']).parent.relative_to('/'))
126 for bindMount in bindMounts: 126 for bindMount in bindMounts:
127 (chroot / bindMount).mkdir(parents=True,exist_ok=True) 127 (chroot / bindMount).mkdir(parents=True,exist_ok=True)
128 print(*['mount', '--bind', pathlib.Path('/') / bindMount, chroot / bindMount], file=stderr)
128 subprocess.run(['mount', '--bind', pathlib.Path('/') / bindMount, chroot / bindMount], check=True) 129 subprocess.run(['mount', '--bind', pathlib.Path('/') / bindMount, chroot / bindMount], check=True)
129 os.chroot(chroot) 130 os.chroot(chroot)
130 os.chdir('/') 131 os.chdir('/')