Mysqldump big db gradually

I have a pretty big db (2TB) that I want to reset gradually (dump range or something else). can this be done with mysqldump? if not, what should i use?

+4
source share
1 answer

mysqldump allows you to delete "databases" or tables individually using the -databases and -tables strong> options. You can use a script that will extract table names from TABLES to INFORMATION_SCHEMA and provide these parameters when mysqldump is called.

To specify a range of rows for dumps of a partial table, use the - where option. The -lock-tables / - single-transaction option can be used to block table changes during a reset. Please refer to the manual as these parameters are used in different situations.

With a powerful scripting language, that is, Python, you can creatively call mysqldump to best solve your problem.

+3
source

Source: https://habr.com/ru/post/1379738/


All Articles