Difference between revisions of "Help:Wiki Backup"

From Mech
Jump to navigationJump to search
m
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 [PASSWORD] -B mewiki > mewiki.sql</pre>
# 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 [PASSWORD] mewiki < mewiki.sql</pre>
# 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

  1. Open SSH Secure Shell
  2. Login to the Hades server (see administrator)
  3. Type:
    mysqldump -h localhost -u [USERNAME] -p -B mewiki > mewiki.sql
  4. Zip the database file:
    gzip mewiki.sql
  5. FTP to the directory containing the mewiki.sql.gz file and download to a safe place
  6. Delete the mewiki.sql.gz file from the server.

Restoring the MySQL Database

  1. Upload the mewiki.sql.gz file to the Hades webserver
  2. Unzip the file:
    gunzip -xf mewiki.sql.gz
  3. Insert the database:
    mysql -h localhost -u [USERNAME] -p mewiki < mewiki.sql
  4. Enter the password for the mysql database
  5. Delete the mewiki.sql from the server.

Backing up the Images Folder

  1. Navigate to the wiki directory (./wiki)
  2. Tar the images folder:
    tar -cf images.tar images
  3. Zip the file:
    gzip images.tar
  4. FTP download the file images.tar.gz to a safe place.
  5. Delete the images.tar.gz file from the server.