I want not only the “Create table” statements, but also the Inserts.
What flags should i pass to mysqldump?
In addition – the database is relatively large (2-2.5G). Obviously, i want the backup to be as fast as possible. Any flags that might help?
Thanks
The
mysqldumpcommand dumps data by default. Just issuingmysqldump dbname > dumpwill produce a dump with the schema and data.To speed up the dump, use
--optparameter which turns on some options like table locking, quick, extended inserts and charset. Using –quick (which is set by –opt too) is a good way to speed up the dump if your database does not fit into memory. Use –quick alone if you can’t afford to lock tables during the dump.If your disks are slow, compress the data before writing it to disk: