Difference between revisions of "Help:Wiki Backup"
From Mech
Jump to navigationJump to searchm |
m |
||
Line 10: | Line 10: | ||
# Open SSH Secure Shell |
# Open SSH Secure Shell |
||
# Login to the Hades server (see administrator) |
# Login to the Hades server (see administrator) |
||
# Type:<pre>mysqldump -h localhost -u [USERNAME] -p |
# Type:<pre>mysqldump -h localhost -u [USERNAME] -p -B mewiki > mewiki.sql</pre> |
||
# Zip the database file:<pre>gzip mewiki.sql</pre> |
# Zip the database file:<pre>gzip mewiki.sql</pre> |
||
# FTP to the directory containing the mewiki.sql.gz file and download to a safe place |
# FTP to the directory containing the mewiki.sql.gz file and download to a safe place |
||
Line 19: | Line 19: | ||
# Upload the mewiki.sql.gz file to the Hades webserver |
# Upload the mewiki.sql.gz file to the Hades webserver |
||
# Unzip the file:<pre>gunzip -xf mewiki.sql.gz</pre> |
# Unzip the file:<pre>gunzip -xf mewiki.sql.gz</pre> |
||
# Insert the database:<pre>mysql -h localhost -u [USERNAME] -p |
# Insert the database:<pre>mysql -h localhost -u [USERNAME] -p mewiki < mewiki.sql</pre> |
||
# Enter the password for the mysql database |
|||
# Delete the mewiki.sql from the server. |
# Delete the mewiki.sql from the server. |
||
Revision as of 18:22, 10 July 2006
LAST BACKUP : 7/7/2006
You need to backup two things in order to restore the wiki:
- The wiki mysql database
- The images folder
Backing up the MySQL Database
- Open SSH Secure Shell
- Login to the Hades server (see administrator)
- Type:
mysqldump -h localhost -u [USERNAME] -p -B mewiki > mewiki.sql
- Zip the database file:
gzip mewiki.sql
- FTP to the directory containing the mewiki.sql.gz file and download to a safe place
- Delete the mewiki.sql.gz file from the server.
Restoring the MySQL Database
- Upload the mewiki.sql.gz file to the Hades webserver
- Unzip the file:
gunzip -xf mewiki.sql.gz
- Insert the database:
mysql -h localhost -u [USERNAME] -p mewiki < mewiki.sql
- Enter the password for the mysql database
- Delete the mewiki.sql from the server.
Backing up the Images Folder
- Navigate to the wiki directory (./wiki)
- Tar the images folder:
tar -cf images.tar images
- Zip the file:
gzip images.tar
- FTP download the file images.tar.gz to a safe place.
- Delete the images.tar.gz file from the server.