Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Important!
This PR relies on the canonical/charmed-mysql-snap#56. Also, it's a copy of the VM PR.
Overview
MySQL stores binary transactions logs. This PR adds a service job to upload these logs to the S3 bucket and the ability to use them later for a point-in-time-recovery with a new
restore-to-time
parameter during restore. This new parameter accepts MySQL timestamp or keywordlatest
(for replaying all the transaction logs).Also, a new application blocked status is introduced -
Another cluster S3 repository
to signal user that used S3 repository is claimed by the another cluster and binlogs collecting job is disabled and creating new backups is restricted (these are the only workload limitation). This is crucial to keep stored binary logs safe from the another clusters. This check uses@@GLOBAL.group_replication_group_name
.After restore, cluster group replication is reinitialized, so practically it becomes a new different cluster. For these cases,
Another cluster S3 repository
message is changed to theMove restored cluster to another S3 repository
to indicate this event more conveniently for the user.Both the block messages will disappear when S3 configuration is removed or changed to the empty repository.
Usage example
juju run mysql/leader restore backup-id=2024-11-20T17:08:24Z restore-to-time="2024-11-20 17:10:01"
juju run mysql/leader restore backup-id=2024-11-20T17:08:24Z restore-to-time="latest"
Key notes