diff --git a/restic_compose_backup/containers.py b/restic_compose_backup/containers.py index 193c048..af2652a 100644 --- a/restic_compose_backup/containers.py +++ b/restic_compose_backup/containers.py @@ -167,7 +167,6 @@ class Container: if self._include: for mount in self._mounts: for pattern in self._include: - print(pattern, self._include) if pattern in mount.source: break else: diff --git a/restic_compose_backup/restic.py b/restic_compose_backup/restic.py index 4fe6d79..a574a84 100644 --- a/restic_compose_backup/restic.py +++ b/restic_compose_backup/restic.py @@ -67,6 +67,26 @@ def snapshots(repository: str, last=True) -> Tuple[str, str]: return commands.run_capture_std(restic(repository, args)) +def forget(repository: str, daily: str, weekly: str, monthly: str, yearly: str): + return restic(repository, [ + 'forget', + '--keep-daily', + daily, + '--keep-weekly', + weekly, + '--keep-monthly', + monthly, + '--keep-yearly', + yearly, + ]) + + +def prune(repository: str): + return restic(repository, [ + 'prune', + ]) + + def check(repository: str): return commands.run(restic(repository, [ "check",