- If i will lock my tables while taking dump of production and at the same time if user will enter any data for specific table. What will happen to that specific insertion ? Will it be discarded or it will be inserted after successful creation of dump ?
- If i will not lock my tables while taking dump of production. Will it create any problem ?
- Which one is preferred way to taking dump of production with or without locking tables ?
If i will lock my tables while taking dump of production and at the
Share
The insertion will be delayed until the dump is finished and then will be executed.
Depends on your data structure. Just keep in mind, that if you are inserting two rows into database, that are connected with each other in some way without locking tables or using transaction, your dump may end up with having only one it in.
If your tables are all InnoDB it is preferred that you dump in transaction. If you use MyISAM tables… then lock tables. Also please look at the direction of XtraBackup.