ping mysql during status

This commit is contained in:
Einar Forselv 2019-11-29 05:36:20 +01:00
parent 648cc85801
commit 95fb69d364
1 changed files with 7 additions and 0 deletions

View File

@ -46,6 +46,13 @@ def status(config, containers):
if container.mysql_backup_enabled: if container.mysql_backup_enabled:
logger.info(' -> mysql %s', 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: if len(backup_containers) == 0:
logger.info("No containers in the project has 'restic-volume-backup.enabled' label") logger.info("No containers in the project has 'restic-volume-backup.enabled' label")