When you backup MySQL Server with command
mysqldump --all-databases > all-db.sql
You get a MySQL backup file containing all databases.
If you want to generate MySQL backup for single database from this file, you can run
sed -n '/^-- Current Database: `DB_NAME`/,/^-- Current Database: `/p' all-db.sql > DB_NAME.sql
See mysqldump
Leave a Reply