Mysql – How to take single database backup using thesqlbackup command in Mysql 8.0.18 version DB

backupMySQLmysql-8.0restore

I have a mysql instance(8.0.18-commercial MySQL enterprise server) with 8 databases in it and out of those I only need to take the backup of DB named 'Test1'.

Please note that its 300 GB sized DB and I want to take backup and restore it using mysqlbackup command. Is there any option for that, please guide me.

Best Answer

If you create the backup using the --tts option, when restoring your instance you can include/exclude selected tables. A whole database is included/excluded by selecting all of its tables with --include/exclude="^databasename\."

The MySQL official documentation explains it very well:

Hope it helps.