mirror of
https://github.com/ZettaIO/restic-compose-backup.git
synced 2025-09-28 06:35:24 +00:00
build a more robust mount path
Mount volumes unti /backup/<service_name>/
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
from restic_volume_backup import utils
|
from restic_volume_backup import utils
|
||||||
|
|
||||||
@@ -140,7 +141,7 @@ class Container:
|
|||||||
volumes = {}
|
volumes = {}
|
||||||
for mount in mounts:
|
for mount in mounts:
|
||||||
volumes[mount.source] = {
|
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,
|
'mode': mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user