WIP
This commit is contained in:
@@ -7,6 +7,10 @@ import click
|
||||
import docker
|
||||
import restic
|
||||
from docker.models.containers import Container
|
||||
from rich import print
|
||||
from rich.console import Console
|
||||
|
||||
console = Console()
|
||||
|
||||
client = docker.from_env()
|
||||
|
||||
@@ -48,13 +52,12 @@ def main(src: Path, docker_stop: str = None):
|
||||
else:
|
||||
cons = set()
|
||||
|
||||
pw_file = Path('/run/secrets/restic-pw').resolve()
|
||||
restic.password_file = pw_file.as_posix()
|
||||
|
||||
restic.backup(
|
||||
paths=[''],
|
||||
dry_run=True
|
||||
)
|
||||
with console.status(f'Running backup'):
|
||||
backup_result = restic.backup(
|
||||
paths=[src],
|
||||
dry_run=True
|
||||
)
|
||||
print(backup_result)
|
||||
|
||||
print(f'{len(restic.snapshots())} snapshots found in the repo')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user