

Comparing S3 Streaming Tools with Percona XtraBackup
source link: https://www.percona.com/blog/2019/11/26/comparing-s3-streaming-tools-with-percona-xtrabackup/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Making backups over the network can be done in two ways: either save on disk and transfer or just transfer without saving. Both ways have their strong and weak points. The second way, particularly, is highly dependent on the upload speed, which would either reduce or increase the backup time. Other factors that influence it are chunk size and the number of upload threads.
Percona XtraBackup 2.4.14 has gained S3 streaming, which is the capability to upload backups directly to s3-compatible storage without saving locally first. This feature was developed because we wanted to improve the upload speeds of backups in Percona Operator for XtraDB Cluster .
There are many implementations of S3 Compatible Storage: AWS S3 , Google Cloud Storage , Digital Ocean Spaces , Alibaba Cloud OSS , MinIO , and Wasabi .
We’ve measured the speed of AWS CLI , gsutil , MinIO client , rclone , gof3r and thexbcloud tool (part of Percona XtraBackup) on AWS (in single and multi-region setups) and on Google Cloud. XtraBackup was compared in two variants: a default configuration and one with tuned chunk size and amount of uploading threads.
Here are the results.
AWS (Same Region)
The backup data was streamed from the AWS EC2 instance to the AWS S3, both in the us-east-1 region.
Tip: If you run MySQL on an EC2 instance to make backups inside one region, do snapshots instead.
AWS (From US to EU)
The backup data was streamed from AWS EC2 in us-east-1 to AWS S3 in eu-central-1.
Tip: Think about disaster recovery, and what will you do when the whole region is not available. It makes no sense to back up to the same region; always transfer backups to another region.
Google Cloud (From US to EU)
The backup data were streamed from Compute Engine instance in us-east1 to Cloud Storage europe-west3. Interestingly, Google Cloud Storage supports both native protocol and S3(interoperability) API . So, Percona XtraBackup can transfer data to Google Cloud Storage directly via S3(interoperability) API.
Tip: A cloud provider can block your account due to many reasons, such as human or robot mistakes, inappropriate content abuse after hacking, credit card expire, sanctions, etc. Think about disaster recovery and what will you do when a cloud provider blocks your account, it may make sense to back up to another cloud provider or on-premise.
Conclusion
xbcloud tool (part of Percona XtraBackup) is 2-5 times faster with tuned settings on long-distance with native cloud vendor tools, and 14% faster and requires 20% less memory than analogs with the same settings. Also, xbcloud is the most reliable tool for transferring backups to S3-compatible storage because of two reasons:
.md5/filename.md5
PS: Please find instructions on GitHub if you would like to reproduce this article’s results.
Recommend
-
71
mysql备份与恢复
-
47
InnoDB keeps hot data in memory on its buffer named InnoDB Buffer Pool. For a long time, when a MySQL instance needed to bounce, this hot cache...
-
40
The backup and restore of a complete database is an extensive exercise. But what if you need to restore just one table which has been mistakenl...
-
40
On Monday, April 27, 2020, Oracle released the highly anticipated 8.0.20 version of the MySQL database server. This release contains changes to the Inn...
-
46
On Monday, July 13, 2020, Oracle released MySQL 8.0.21. This release contained a few new changes that cause issues with Percona XtraBackup.
-
9
Back to the Homepage
-
16
Redesign of -lock-ddl-per-table in Percona XtraBackupBack to the Homepage
-
8
Percona XtraBackup: Introducing Support For Storage Class in xbcloudBack to the Homepage
-
10
The MySQL Clone Wars: Plugin vs. Percona XtraBackupBack to the Homepage
-
7
When it comes to backups, there are several options for saving backup files. You can choose to save them locally on the same server, stream them to different servers, or store them in object storage.
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK