Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor mysql s3 backup task #297

Merged
merged 1 commit into from
Aug 9, 2024
Merged

Conversation

msherman64
Copy link
Contributor

@msherman64 msherman64 commented Aug 5, 2024

The primary change in this commit is to replace use of the "aws-cli"
tool with "rclone", as the AWS tools are not compatible with ceph rgw
based s3 implementations.

Additionally, this removes support for the mysqldump based legacy
backups, and refactors the backup script for readability and improved
logging.

Behavior changes:
Rather than only the latest backup file, rclone will copy any new files
that are not present in the object store, but will NOT overwrite
existing ones.

@msherman64
Copy link
Contributor Author

One concern (not sure best way to fix) is how to disable this.

We'd basically need a "enable_mariadb_backup_auto" flag, and have ansible ensure the relevant scripts and timers are removed if not set to true.

The primary change in this commit is to replace use of the "aws-cli"
tool with "rclone", as the AWS tools are not compatible with ceph rgw
based s3 implementations.

Additionally, this removes support for the mysqldump based legacy
backups, and refactors the backup script for readability and improved
logging.

Behavior changes:
Rather than only the latest backup file, rclone will copy any new files
that are not present in the object store, but will NOT overwrite
existing ones.
@Mark-Powers
Copy link
Contributor

What is actually creating the backups now? Is this syncing the volume data directly?

@msherman64
Copy link
Contributor Author

What is actually creating the backups now? Is this syncing the volume data directly?

The backups are created by a cronjob on the deploy host which executes cc-ansible mariadb_backup, which uses mariabackup to create backups from the running mariadb server/cluster, and stores those backups into the mariadb_backup docker volume.

the cron job here just handles rotating those backup files, and copying them from this docker volume to an object store bucket.

Copy link
Member

@codyhammock codyhammock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 👍🏻

@msherman64 msherman64 merged commit bb359d1 into stable/2023.1 Aug 9, 2024
1 check passed
@msherman64 msherman64 deleted the fix/refactor_mysql_backup branch August 9, 2024 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants