From 95fb69d364ef3c0edbeea04c594c9a0dafb3f6b1 Mon Sep 17 00:00:00 2001 From: Einar Forselv Date: Fri, 29 Nov 2019 05:36:20 +0100 Subject: [PATCH] ping mysql during status --- restic_volume_backup/cli.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/restic_volume_backup/cli.py b/restic_volume_backup/cli.py index 5751969..218ef5b 100644 --- a/restic_volume_backup/cli.py +++ b/restic_volume_backup/cli.py @@ -46,6 +46,13 @@ def status(config, containers): 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 len(backup_containers) == 0: logger.info("No containers in the project has 'restic-volume-backup.enabled' label")