summaryrefslogtreecommitdiff
path: root/hosts/vidhar/borg/copy.py
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-02-17 17:48:02 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-02-17 17:48:02 +0100
commit09460426f5d24e62afd4fdad0ba9c2588f012f97 (patch)
tree3b34684afb0f46450089dce0374b49b7b1325578 /hosts/vidhar/borg/copy.py
parentd4982d6b72565352b04ce0eb4cd6ce6caa52232a (diff)
downloadnixos-09460426f5d24e62afd4fdad0ba9c2588f012f97.tar
nixos-09460426f5d24e62afd4fdad0ba9c2588f012f97.tar.gz
nixos-09460426f5d24e62afd4fdad0ba9c2588f012f97.tar.bz2
nixos-09460426f5d24e62afd4fdad0ba9c2588f012f97.tar.xz
nixos-09460426f5d24e62afd4fdad0ba9c2588f012f97.zip
vidhar: ...
Diffstat (limited to 'hosts/vidhar/borg/copy.py')
-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 c839194c..578394cc 100755
--- a/hosts/vidhar/borg/copy.py
+++ b/hosts/vidhar/borg/copy.py
@@ -112,6 +112,7 @@ def copy_archive(src_repo_path, dst_repo_path, entry):
112 bindMounts.append(pathlib.Path(os.environ['SSH_AUTH_SOCK']).parent.relative_to('/')) 112 bindMounts.append(pathlib.Path(os.environ['SSH_AUTH_SOCK']).parent.relative_to('/'))
113 for bindMount in bindMounts: 113 for bindMount in bindMounts:
114 (chroot / bindMount).mkdir(parents=True,exist_ok=True) 114 (chroot / bindMount).mkdir(parents=True,exist_ok=True)
115 print(*['mount', '--bind', pathlib.Path('/') / bindMount, chroot / bindMount], file=stderr)
115 subprocess.run(['mount', '--bind', pathlib.Path('/') / bindMount, chroot / bindMount], check=True) 116 subprocess.run(['mount', '--bind', pathlib.Path('/') / bindMount, chroot / bindMount], check=True)
116 os.chroot(chroot) 117 os.chroot(chroot)
117 os.chdir('/') 118 os.chdir('/')