Difference between revisions of "User:Aeric/Backup Notes"
From LongJump Support Wiki
imported>Aeric |
imported>Aeric |
||
Line 4: | Line 4: | ||
:{| | :{| | ||
<pre> | <pre> | ||
mysqldump -u[USERNAME] -p[DBNAME] | bzip2 > [/path_to_file/DBNAME].sql.bz2 | mysqldump -u[USERNAME] -p[DBNAME] | bzip2 > [/path_to_file/DBNAME]_data.sql.bz2 | ||
</pre> | </pre> | ||
|} | |} | ||
Line 13: | Line 13: | ||
cd /path_to_file | cd /path_to_file | ||
bunzip2 [DBNAME].sql.bz2 | bunzip2 [DBNAME].sql.bz2 | ||
mysql -uName -pPW wikiNN < | mysql -uName -pPW wikiNN < [DBNAME]_data.sql | ||
</pre> | </pre> | ||
|} | |} |
Revision as of 00:53, 6 August 2011
- Export
- Easiest way is to use phpMyAdmin
- -or-
mysqldump -u[USERNAME] -p[DBNAME] | bzip2 > [/path_to_file/DBNAME]_data.sql.bz2
- Import
cd /path_to_file bunzip2 [DBNAME].sql.bz2 mysql -uName -pPW wikiNN < [DBNAME]_data.sql