Thursday 15 July 2010

How To: Backup Your Wiki - Backing Up The Wiki (Part 2 of 2)

If you haven't already done so please read Part of How to Backup Your Wiki for an insight on what actually requires backing up and the prerequisites before proceeding. ;)

Getting Started


Access your web hosting account through FTP using FileZilla or a similar client. If using FileZilla, the download destination for files you backup will default to the folder currently being viewed in the main window to the left, the right window contains the files and folders currently being stored by your web host. Choose your preferred location to store your Wiki's backup files and create a directory there by right-clicking an empty space in the left window and clicking "Create directory" naming the folder "Wiki Backup" or something similar.

Finding the Files and Folders

In the window above the main right window, find the folder called "public_html" and double-click it. You should now see the folder folder you chose to install your Wiki in when first setting up the MediaWiki software package, the name of the folder is typically something like "wiki" or "w", double-click this folder, this is known as the "root" folder. Both the LocalSettings.php and AdminSettings.php files are stored in the root folder so find them and download them by right-clicking each file and clicking "Download". Your LocalSettings and AdminSettings files are now backed up.

Next, find your Wiki's "images" folder, this also will be in your Wiki's "root" folder and should be somewhere near the top. Right-click the folder and click "Download" (This may take some time to download depending on how many images have been uploaded to your Wiki). After all files have transferred successfully your images have been backed up.
If you have any extensions installed you will also need to download a copy of the "extensions" folder located in your Wiki's root folder.

Backing up a Custom Skin

If you're currently using a custom skin on your Wiki, this will also need to be backed up. The skin's files will be located in the "skins" folder. The "skins" folder contains a bunch of main skin files and folders named after the respective skins, you will need to download a copy of your skin's main file (It will be called something like "MyCustomSkinName.php") and its corresponding folder, again, named after the skin.

Backing up your Wiki's pages, users, their preferences, logs and everything else...

... Isn't as painful and complicated as it sounds believe it or not. You will need to access your Wiki's database though (D'oh!). Tell you what though, for all of you out there who (like me) have a very limited knowledge of using databases I'll make this as simple as I possibly can for you and I'll even upload some screenshots, how about that? :)

Ok, first of all you'll need to log in to your Wiki's database with the username and password supplied to you by your web host, if you don't know where to log in, your username or password please contact your web host and they should be able to give you the details you need.
Once logged in there the name of your database on the left-hand side of the screen, click the name of your database and then look for an "Export" tab (this should look something like the way it does in the screenshot supplied below).


You should now have roughly 3 or so export settings sections. "Export", "Options" and "Save as file". Typically you want the default settings in each of these sections. There are a few things to check however, make sure that all of the contents of the box below is selected.

You will also want to make sure that out of the options available underneath this box, you have the export as "SQL" option selected. And finally you can go straight ahead and click "Go" to download your Wiki's database. Once successfully downloaded your entire database will be backed up, so that means you will now have backed up: Your Wiki's pages, its page histories, logs, users and user preferences. A word of warning however, do not under any circumstances manually edit your SQL backup, as you will muck it up.

Congratulations, you've now completely backed up your Wiki!

No comments:

Post a Comment