Forum Stats

  • 3,769,359 Users
  • 2,252,957 Discussions
  • 7,875,002 Comments

Discussions

How can I use mysqlbackup to restore a database with another database name?

4221600
4221600 Member Posts: 3
edited Apr 21, 2020 10:23AM in MySQL Community Space

Hi,

I have the following script to backup my database (mysql5.7) with MysqlBackup,

but I don't found how can I restore with the file generated in another database name

/opt/mysql/meb-4.1/bin/mysqlbackup  \

--defaults-file=/etc/my.cnf   \

--databases=DatabaseName\

--compress   \

--compress-level=5  \

-u$USER  \

-p$PASS  \

--backup-dir=/tmp/mysql/$FECHA  \

--backup-image=$DIR_BKP/$FECHA/uyancapuntos_$FECHA.mbi  \

--socket=/var/lib/mysql/mysql.sock  \

--key-file=/opt/mysql/meb-4.1/bin/keyfile  \

backup-to-image

Could someone help me with this?

best regards,

4221600

Answers