mysql_mysqldump_database
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| mysql_mysqldump_database [2015/12/14 12:12] – created luke7858 | mysql_mysqldump_database [2024/05/23 07:26] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | === Basic Dump === | ||
| + | __**NOTE: | ||
| + | \\ | ||
| + | If table engines are MyISAM, a write AND read lock will be placed on the tables, which means there will be " | ||
| + | \\ | ||
| + | Change ' | ||
| + | <sxh bash> | ||
| + | select engine, | ||
| + | </ | ||
| + | \\ | ||
| + | \\ | ||
| + | You can then perform a dump with: | ||
| + | <sxh bash> | ||
| + | \\ | ||
| + | **Recommended**: | ||
| + | \\ | ||
| + | You can also use the following to add date to the mysql dump: | ||
| + | <sxh bash> | ||
| + | == Dumping with progress report == | ||
| + | <sxh bash> | ||
| + | \\ | ||
| + | Note: It may be benefitial to run the mysql dump in a screen session depending on how large the database is. | ||
| + | \\ | ||
| + | To view database size please visit: https:// | ||
| + | ------------------------------------------------------------------------ | ||
| + | === Importing === | ||
| + | Once you have created the db you can import with: | ||
| + | |||
| + | <sxh bash> | ||
| + | |||
| + | \\ | ||
| + | Using PV to import - Progress report | ||
| + | <sxh bash> | ||
| + | pv database_file.sql | mysql database_name | ||
| + | </ | ||
| + | ------------------------------------------------------------------------ | ||
| + | \\ | ||
| + | \\ | ||
| + | === Advanced mysql dump === | ||
| === Database Engine === | === Database Engine === | ||
| Check the db engines before you dump. This will allow you to find the most efficient way of dumping the tables | Check the db engines before you dump. This will allow you to find the most efficient way of dumping the tables | ||
| Line 63: | Line 102: | ||
| \\ | \\ | ||
| ----- | ----- | ||
| - | === Basic Dump === | ||
| - | You can then perform a dump with: | ||
| - | |||
| - | <sxh bash> | ||
| - | You can also use the following to add date to the mysql dump: | ||
| - | <sxh bash> | ||
| - | == Dumping with progress report == | ||
| - | <sxh bash> | ||
| - | \\ | ||
| - | \\ | ||
| - | ------------------------------------------------------------------------ | ||
| - | === Importing === | ||
| - | Once you have created the db you can import with: | ||
| - | |||
| - | <sxh bash> | ||
mysql_mysqldump_database.1450095125.txt.gz · Last modified: 2024/05/23 07:26 (external edit)
