mirror of
https://github.com/ZettaIO/restic-compose-backup.git
synced 2026-11-17 18:35:40 +00:00
Separate mariadb and mysql
This commit is contained in:
1 parent
123f863b51
commit
a5091db501
3 files changed
+16
-1
No files matched your search
@@ -54,6 +54,16 @@ def status(config, containers):
|
||||
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 len(backup_containers) == 0:
|
||||
logger.info("No containers in the project has 'restic-volume-backup.enabled' label")
|
||||
|
||||
|
||||
@@ -75,6 +75,7 @@ class Container:
|
||||
return any([
|
||||
self.volume_backup_enabled,
|
||||
self.mysql_backup_enabled,
|
||||
self.mariadb_backup_enabled,
|
||||
self.postgresql_backup_enabled,
|
||||
])
|
||||
|
||||
@@ -86,6 +87,10 @@ class Container:
|
||||
def mysql_backup_enabled(self) -> bool:
|
||||
return utils.is_true(self.get_label('restic-volume-backup.mysql'))
|
||||
|
||||
@property
|
||||
def mariadb_backup_enabled(self) -> bool:
|
||||
return utils.is_true(self.get_label('restic-volume-backup.mariadb'))
|
||||
|
||||
@property
|
||||
def postgresql_backup_enabled(self) -> bool:
|
||||
return utils.is_true(self.get_label('restic-volume-backup.postgresql'))
|
||||
|
||||
Reference in new issue
Block a user