Charmed MySQL
- Canonical
- Cloud
Channel | Revision | Published | Runs on |
---|---|---|---|
8.0/stable | 313 | 03 Dec 2024 | |
8.0/stable | 312 | 03 Dec 2024 | |
8.0/candidate | 313 | 02 Dec 2024 | |
8.0/candidate | 312 | 02 Dec 2024 | |
8.0/beta | 313 | 02 Dec 2024 | |
8.0/beta | 312 | 02 Dec 2024 | |
8.0/edge | 325 | 19 Dec 2024 | |
8.0/edge | 324 | 19 Dec 2024 |
juju deploy mysql --channel 8.0/stable
Deploy universal operators easily with Juju, the Universal Operator Lifecycle Manager.
Platform:
charms.mysql.v0.backups
-
- Last updated 13 Sep 2024
- Revision Library version 0.12
MySQL helper class for backups and restores.
The MySQLBackups
class can be instantiated by a MySQL charm , and contains
event handlers for list-backups
, create-backup
and restore
backup actions.
These actions must be added to the actions.yaml file.
An example of instantiating the MySQLBackups
:
from charms.data_platform_libs.v0.s3 import S3Requirer
from charms.mysql.v0.backups import MySQLBackups
from charms.mysql.v0.backups import MySQLBase
class MySQL(MySQLBase):
def __init__(self, *args):
super().__init__(*args)
self.s3_integrator = S3Requirer(self, "s3-integrator")
self.backups = MySQLBackups(self, self.s3_integrator)
@property
def s3_integrator_relation_exists(self) -> bool:
# Returns whether a relation with the s3-integrator exists
return bool(self.model.get_relation(S3_INTEGRATOR_RELATION_NAME))
def is_unit_blocked(self) -> bool:
# Returns whether the unit is in blocked state and should run any operations
return False
class MySQLBackups
Description
Encapsulation of backups for MySQL. None
Methods
MySQLBackups. __init__( self , charm , s3_integrator: S3Requirer )