Difference between revisions of "User:Aeric/Backup Notes"
From LongJump Support Wiki
imported>Aeric |
imported>Aeric |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
;Export: | ;Database Export: | ||
:Easiest way is to use phpMyAdmin | :Easiest way is to use phpMyAdmin | ||
:-or- | :-or- | ||
:{| | :{| | ||
<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> | |||
|} | |} | ||
;Import: | ;Database Import: | ||
:{| | :{| | ||
<pre> | <pre> | ||
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> | ||
|} | |} | ||
;Files: | |||
# Start VPN. | |||
# Login to server as root (PuTTY) | |||
# <tt>cd /usr/share/mediawiki</tt> | |||
# <tt>zip -rvT {wiki}.zip {wiki}/</tt> # Create zip file | |||
# <tt>zip -l {wiki}.zip</tt> # Confirm contents | |||
# Use FileZilla to download | |||
# unzip locally |
Latest revision as of 22:59, 27 September 2012
- Database Export
- Easiest way is to use phpMyAdmin
- -or-
mysqldump -u[USERNAME] -p[DBNAME] | bzip2 > [/path_to_file/DBNAME]_data.sql.bz2
- Database Import
cd /path_to_file bunzip2 [DBNAME].sql.bz2 mysql -uName -pPW wikiNN < [DBNAME]_data.sql
- Files
- Start VPN.
- Login to server as root (PuTTY)
- cd /usr/share/mediawiki
- zip -rvT {wiki}.zip {wiki}/ # Create zip file
- zip -l {wiki}.zip # Confirm contents
- Use FileZilla to download
- unzip locally