[TYPO3-english] Flags to give to mysqldump

Oliver Salzburg oliver.salzburg at googlemail.com
Fri Mar 2 21:21:20 CET 2012

On 2012-03-02 20:55, Koji Yanagisawa wrote:
> Dear Typo3sters,
> Does anyone pay special care to which flags to use when running mysqldump?  Since Typo3 uses both MyISAM and InnoDB, I sort of figure using --single-transaction should enhance consistency.  It locks tables by default via --opt.  Otherwise I just use --all-databases, but what do you do?
> Thanks,
> --Koji

This is something I'm also very interested in but didn't have time yet
to properly investigate.
I always assumed that the default parameters should work pretty well.

So far I simply used:
--add-drop-table --add-drop-database --databases <typo3db>

But your email made me look up --opt, which sounded like a major

 Use of --opt is the same as specifying --add-drop-table, --add-locks,
--create-options, --disable-keys, --extended-insert, --lock-tables,
--quick, and --set-charset.

But then:

All of the options that --opt stands for also are on by default because
--opt is on by default.

Ok, so --opt is pointless to provide on the command line. So is the
--add-drop-table in my use.

And it includes --lock-tables (which i always assumed to be on by
default), which I think is the most important parameter.

--single-transaction sounds like an improvement considering overall
performance (as no locking is required and your site will run better
during the dump), but it shouldn't be required to ensure data

More input on this is greatly appreciated.


More information about the TYPO3-english mailing list