- Forums
- MYSQL
- How To Mysqldump Only One Table
If You Want To Know How To Mysqldump Only One Table This Post Will Show You Backing Up Only One Table In The Entire Database This Will Help You [2319], Last Updated: Mon Jun 24, 2024
Webune Tutorials
Fri Jan 08, 2010
0 Comments
533 Visits
Webune Offers dedicated linux server. we also provide web hosting with php and MySQL
if you want to know how you can backup only one table in your whole database you can do it with one command. this command i will show you, you can even zip it to make it smaller:
in the following example, lets say i have this information:
db usename: WEBUSER
db password: DBPASSWORD
database name: MYBLOG
db table: DBTABLE
name of the backup file: MYBACKUPDB
ok use this linux shell command to create it:
SHELL COMMAND:
mysqldump -u WEBUSER -pDBPASSWORD MYBLOG DBTABLE | gzip > MYBACKUPDB.sql.gz
now, how about to install it - use this command:
SHELL COMMAND:
gunzip < MYBACKUPDB.sql.gz | mysql -u WEBUSER -pDBPASSWORD MYBLOG
done