Use of mysqldump for taking backup of one table
In this section you will see the example of mysqldump function which takes the backup of only one table.
The mysqldump utility provides many options to take the backup of data as per user requirement. You can specify the name of table be backup in while executing the mysqldump utility.
Let's assume we have to take the backup of table1 from the mydatabase, then you can issue the following command on the console:
mysqldump -u -p mydatabase table1 > table1.sql
To restore the backup you can use the following command:
mysql -u -p mydatabase < table1.sql
The mysqldump is very handy tool, it can be easily used to take the backup of only one table from the database.
Posted on: April 8, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles