Wiki - restoring

From NoskeWiki
Jump to: navigation, search


NOTE: This page is a daughter page of: Wiki

I've had about three incidents now where I had to re-install my database from scratch. The last of these events was August 2013 when my web-hosting company somehow moved to database. I lost many images and a couple of pages of text when this happened, which was very frustrating, but fortunately it was only a month or so because I like to try and backup pages once a month using my instructions:

A little crude, but here's the steps I took to restore the information:

Restoring Text

Method 1 - Use "Import Pages"

  1. Find your latest "noskewiki_backup_(2013-06-13)_export.xml" file (exported using Special:Export / Wiki - backing up).
  2. Go to: Special:Import... enter the backup file, and pray it works!
  • NOTE: I've never actually done this, usually I like to upload pages individually. My suspicion is that if it does work then characters like "<" will import as "<" and there is probably no way around that (it's an XML file remember) except to load pages later and manually fix these.... I could be wrong though!

Method 2 - Upload pages one at a time

  1. Make a copy of your latest "noskewiki_backup_(2013-06-13)_export.xml" file.
  2. Open the copy in a text editor (WordPad should be able to handle it, or try "Vi-IMproved" (on Windows) for really large files).
  3. Do a find and replace for all the "special characters" in the table below.
  4. Search for all the <title> tags (each is a new page) and create a new page for this and paste in its content.
  • NOTE: It's slow, but I've used this method in the past as a chance to see if my page needs an update or in-browser spell check. See my Reviewing text for common grammar errors I make.

Special Characters to Replace from XML File

Here's some characters I needed to find/replace last time:

Find Replace
< <
> >
" "
& &
– -
… ...
’ '
‘ '
“ "
é é

..... and then search for any left over à and â occurrences for other fancy characters (which might appear in words like "entrée").

Restoring Images

Once all pages are setup there's a handy page called: "Category:Pages_with_broken_file_links" which can help you find which images you need to upload. Once you've uploaded each pages images you'll need to make a change to the page itself so it removes itself from the list of pages. In my case I also like to add a tag to put pages with images in the, but the broken file list is more reliable.

I'm sure there's an extension somewhere to bulk upload images, but I haven't used it yet. On the last time I uploaded all my images I decided to copy all the comments I typed in so I wouldn't lose them. I keep the comment descriptions in a Google Drive spreadsheet called Wiki_Images_List.

See Also