Forum Stats

  • 3,781,297 Users
  • 2,254,499 Discussions
  • 7,879,635 Comments

Discussions

Mysqlbackup: restore schema with rename

2726429
2726429 Member Posts: 5
edited Feb 13, 2017 1:23AM in MySQL Community Space

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

Tagged:

Best Answer

  • Dave Stokes-MySQL Community Team-Oracle
    Dave Stokes-MySQL Community Team-Oracle MySQL Community Manager TexasMember Posts: 370 Employee
    edited Jan 25, 2017 9:52AM Accepted Answer

    I am looking in the MEB 4.0 users guide under  'Backup Repository Options' and there is not a 'rename' option. You might make this a feature request to the developers as I am sure there are others who would use the option.

    Dave Stokes

    MySQL Community Manager

Answers