|
|
@@ -24,12 +24,14 @@ def main():
|
|
|
hostname = socket.gethostname()
|
|
|
container_name = "borgmatic"
|
|
|
ssh_auth_sock = os.getenv("SSH_AUTH_SOCK")
|
|
|
- config_path = Path.cwd() / "data" / "borgmatic.d"
|
|
|
+ config_d_path = Path.cwd() / "data" / "borgmatic.d"
|
|
|
+ config_path = Path.cwd() / "data" / "borgmatic"
|
|
|
credentials_path = Path.cwd() / "data" / "credentials"
|
|
|
storage_box_env = credentials_path / "storage_box_env"
|
|
|
ssh_config_path = Path.home() / ".ssh"
|
|
|
volumes = [
|
|
|
- f"{config_path}:/etc/borgmatic.d/",
|
|
|
+ f"{config_d_path}:/etc/borgmatic.d/",
|
|
|
+ f"{config_path}:/etc/borgmatic/",
|
|
|
f"{credentials_path}:/credentials/",
|
|
|
f"{ssh_config_path}:/root/.ssh",
|
|
|
"borg_config:/root/.config/borg",
|
|
|
@@ -45,7 +47,7 @@ def main():
|
|
|
ssh_key_name = "theenglishway.pub"
|
|
|
|
|
|
volumes += [
|
|
|
- f"{vol}:{to_source_path(vol)}:ro" for vol in data_sources
|
|
|
+ f"{vol}:{to_source_path(vol)}:ro" for vol in data_sources if vol.exists()
|
|
|
]
|
|
|
|
|
|
volume_args = [a for vol in volumes for a in ["-v", vol]]
|