From e6d914df7cce26f77073481328ccd6571071bd74 Mon Sep 17 00:00:00 2001 From: Einar Forselv Date: Tue, 26 Nov 2019 12:30:44 +0100 Subject: [PATCH] build a more robust mount path Mount volumes unti /backup// --- restic_volume_backup/containers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/restic_volume_backup/containers.py b/restic_volume_backup/containers.py index bcf49f1..b792ad8 100644 --- a/restic_volume_backup/containers.py +++ b/restic_volume_backup/containers.py @@ -1,4 +1,5 @@ import os +from pathlib import Path from restic_volume_backup import utils @@ -140,7 +141,7 @@ class Container: volumes = {} for mount in mounts: volumes[mount.source] = { - 'bind': '{}{}'.format(source_prefix, mount.source), + 'bind': str(Path(source_prefix) / self.service_name / Path(utils.strip_root(mount.destination))), 'mode': mode, }