MySQL Dump the table structure only no data

The only option that is different than creating an entire backup is the -d switch, which tells mysqldump not to output the data.

mysqldump -u root -pmypassword -d proftpd > /root/proftp.sql

This should leave you with the table structure without the data. To restore the DB do the following:

mysql -u root -pmypassword proftpd < proftpd.sql

For this to work the database proftpd must exist as an empty database.

Leave a Reply

Your email address will not be published. Required fields are marked *