From fd27217ba82d731dce43274d9368364d22cd7445 Mon Sep 17 00:00:00 2001 From: Einar Forselv Date: Tue, 3 Dec 2019 01:47:58 +0100 Subject: [PATCH] rvb status: Remove old cruft --- restic_volume_backup/cli.py | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/restic_volume_backup/cli.py b/restic_volume_backup/cli.py index 3756cc4..3c296dc 100644 --- a/restic_volume_backup/cli.py +++ b/restic_volume_backup/cli.py @@ -44,25 +44,10 @@ def status(config, containers): for mount in container.filter_mounts(): logger.info(' - volume: %s', mount.source) - if container.mysql_backup_enabled: - logger.info(' -> mysql %s', container.mysql_backup_enabled) - creds = container.get_mysql_credentials() - restic.ping_mysql( - creds['host'], - creds['port'], - creds['username'], - creds['password'], - ) - - if container.mariadb_backup_enabled: - logger.info(' -> mariadb %s', container.mysql_backup_enabled) - creds = container.get_mysql_credentials() - restic.ping_mysql( - creds['host'], - creds['port'], - creds['username'], - creds['password'], - ) + if container.database_backup_enabled: + instance = container.instance + print(instance.container_type) + print(instance.ping()) if len(backup_containers) == 0: logger.info("No containers in the project has 'restic-volume-backup.enabled' label")