Mysql: Restore only specific table from a full database backup or dump

by rajesh 2013-11-24 13:35:13

We can use the bellow command to create a table backup or table dumb from a full database dump

sed -n -e '/CREATE TABLE.*mytable/,/CREATE TABLE/p' mydatabase.dump > mytable.dump


mydatabase.dump = Full database backup file name
mytable = The table that needs to be restored


After creating the table dump, we can use mysql command to restore it in to the database.
478
like
0
dislike
0
mail
flag

You must LOGIN to add comments