This commit is contained in:
Einar Forselv
2019-12-05 11:09:36 +01:00
parent 0a9e5edfe4
commit 6f06d25db5
7 changed files with 12 additions and 12 deletions

View File

@@ -1,5 +1,4 @@
import argparse
import pprint
import logging
from restic_compose_backup import (
@@ -63,7 +62,8 @@ def status(config, containers):
ping = instance.ping()
logger.info(' - %s (is_ready=%s)', instance.container_type, ping == 0)
if ping != 0:
logger.error("Database '%s' in service %s cannot be reached", instance.container_type, container.service_name)
logger.error("Database '%s' in service %s cannot be reached",
instance.container_type, container.service_name)
if len(backup_containers) == 0:
logger.info("No containers in the project has 'restic-compose-backup.enabled' label")
@@ -185,6 +185,7 @@ def cleanup(config, containers):
prune_result = restic.prune(config.repository)
return forget_result == 0 and prune_result == 0
def snapshots(config, containers):
"""Display restic snapshots"""
stdout, stderr = restic.snapshots(config.repository, last=True)