rds migration from on premises MySQL 8

0

Hello all, I have MySQL database on premises, MySQL 8 I want to export it and import it into RDS I tried mysqldump added the dump file to S3 bucket and run restore from S3 i got: Incompatible-restore I tried xtrabackup (as advised in some aws kb) and i uploaded the backup folder to S3 bucket again i got Incompatible-restore

I tried xtrabackup with gz (gzip -c > /backup/xtrabackup.tar.gz) produced a gunzip tar file uploaded it to S3 and again same thing: Incompatible-restore the database is very small less than 100 mb , what is your recommendations? and is there any way to get more details from RDS regarding to the Incompatible-restore error ? a full log or something ? Thanks.

2개 답변
0
수락된 답변

Hello,

You are doing the right steps in migrating the backup by using S3. Below are a few considerations before you do the same. The following are some limitations and recommendations for importing backup files from Amazon S3:

You can only import your data to a new DB instance, not an existing DB instance.

You must use Percona XtraBackup to create the backup of your on-premises database.

You can't import data from a DB snapshot export to Amazon S3.

You can't migrate from a source database that has tables defined outside of the default MySQL data directory.

You must import your data to the default minor version of your MySQL major version in your AWS Region. For example, if your major version is MySQL 8.0, and the default minor version for your AWS Region is 8.0.28, then you must import your data into a MySQL version 8.0.28 DB instance. You can upgrade your DB instance after importing. For information about determining the default minor version, see MySQL on Amazon RDS versions.

Backward migration is not supported for both major versions and minor versions. For example, you can't migrate from version 8.0 to version 5.7, and you can't migrate from version 8.0.28 to version 8.0.27.

You can't import an on-premises MySQL database from one major version to another. For example, you can't import a MySQL 5.7 database to an RDS for MySQL 8.0 database. You can upgrade your DB instance after you complete the import.

You can't restore from an encrypted source database, but you can restore to an encrypted Amazon RDS DB instance.

You can't restore from an encrypted backup in the Amazon S3 bucket.

Importing from Amazon S3 is not supported on the db.t2.micro DB instance class. However, you can restore to a different DB instance class, and change the DB instance class later. For more information about instance classes, see Hardware specifications for DB instance classes.

When you restore the database, the backup is copied and then extracted on your DB instance. Therefore, provision storage space for your DB instance that is equal to or greater than the sum of the backup size, plus the original database's size on disk.

User accounts are not imported automatically. Save your user accounts from your source database and add them to your new DB instance later.

Functions are not imported automatically. Save your functions from your source database and add them to your new DB instance later.

Stored procedures are not imported automatically. Save your stored procedures from your source database and add them to your new DB instance later.

Time zone information is not imported automatically. Record the time zone information for your source database, and set the time zone of your new DB instance later.

Verify the above & check if it helps !!

Thanks

Chirag

profile pictureAWS
지원 엔지니어
답변함 2년 전
0

Thank you!, its worked, after second try following your guide lines, first time i exported using databases= its exported successfully, but did not work with RDS, got same compatibility error, second time i exported the whole with Xtraback, uploaded the folder to S3, and its worked perfectly, thank you again.

답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인