Skip to Main Content

MySQL Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Mysqlbackup: restore schema with rename

2726429Jan 25 2017 — edited Feb 13 2017

Hi,

I run following command to take a backup of my instance:

[MySQL Enterprise Backup version 4.0.3 Linux-4.1.12-37.4.1.el6uek.x86_64-x86_64 ]

mysqlbackup --user=root -p --host=127.0.0.1 --backup-dir=/nfsbackup/bk_meb --use-tts --with-timestamp --include='.*' --compress --compress-level=9 --backup-image=mysql.mib backup-to-image

Is possible restore schema changing the name, like as tables:

mysqlbackup --user=root -p --host=127.0.0.1 --backup-dir=/nfsbackup/bk_meb/2017-01-25_12-34-00 --backup-image=mysql.mib --datadir=/DATA1/data --uncompress --include-tables="mydb\.mytable" --rename="mytable TO mytable_new" copy-back-and-apply-log

If not, is possible to restore the table without foreign keys?

Thank you

regards

This post has been answered by Dave Stokes-MySQL Community Team-Oracle on Jan 25 2017
Jump to Answer
Comments
Post Details
Added on Jan 25 2017
5 comments
821 views