After some search I ended up with the following settings:
mysqldump\
--host=localhost\
--port=3306\
--databases ****\
--user=****\
--password=****\
--default-character-set=utf8\
--add-drop-database\
--add-drop-table\
--add-locks\
--complete-insert\
--extended-insert\
--lock-all-tables\
--create-options\
--disable-keys\
--quick\
--order-by-primary\
--set-charset\
--tz-utc\
> dump/test.sql
So far so good but I have some questions regarding the parameters as well as the execution.
Regarding my first concern, I just want to make sure that all of them are required and do not cause any conflicts when used together. Ultimately, I would like to make a very robust and consistent dump file, with millions of records, that creates tables, databases, and inserts data. The good thing is that making the database not-available for a while is not a problem for me. My only goal is to make a robust and consistent dump file.
Regarding my second concert, I would like to know how to get informed when then command goes wrong and if so throw an exception.
Any ideas?
Aucun commentaire:
Enregistrer un commentaire