Difference between revisions of "Help:Wiki Backup"
From Mech
Jump to navigationJump to search(7 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
'''LAST BACKUP : BJS 8/11/2006''' |
|||
You need to backup two things in order to restore the wiki: |
You need to backup two things in order to restore the wiki: |
||
* The wiki mysql database |
* The wiki mysql database |
||
* The images folder |
* The images folder |
||
* The settings files |
|||
===Backing up the MySQL Database=== |
===Backing up the MySQL Database=== |
||
Line 8: | Line 11: | ||
# 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 |
# 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 |
||
# Delete the mewiki.sql.gz file from the server. |
|||
To restore the wiki database, |
|||
# Upload the mewiki.sql.gz file to the Hades webserver |
|||
# Unzip the file:<pre>gunzip -xf mewiki.sql.gz</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. |
|||
===Backing up the Images Folder=== |
===Backing up the Images Folder=== |
||
Line 18: | Line 30: | ||
# Zip the file:<pre>gzip images.tar</pre> |
# Zip the file:<pre>gzip images.tar</pre> |
||
# FTP download the file images.tar.gz to a safe place. |
# FTP download the file images.tar.gz to a safe place. |
||
# Delete the images.tar.gz file from the server. |
|||
===Backing up the Settings Files=== |
|||
# goto the wiki directory (./wiki) |
|||
# Copy the file, LocalSettings.php, to your backup folder |
|||
# Copy the folder, external, to your backup folder |
|||
To restore, |
|||
# copy "LocalSettings.php" and the "external" folder to the wiki directory. |
|||
# make sure the "external" folder is chmod 711. |
Latest revision as of 09:29, 11 August 2006
LAST BACKUP : BJS 8/11/2006
You need to backup two things in order to restore the wiki:
- The wiki mysql database
- The images folder
- The settings files
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.
To restore the wiki 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.
Backing up the Settings Files
- goto the wiki directory (./wiki)
- Copy the file, LocalSettings.php, to your backup folder
- Copy the folder, external, to your backup folder
To restore,
- copy "LocalSettings.php" and the "external" folder to the wiki directory.
- make sure the "external" folder is chmod 711.