MrSimonC / MediaWikiBackup

Back up all files, content, images from a restricted/private Media Wiki account (e.g. miraheze.org)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Media Wiki Backup

A simple bash script, runable in windows via gitbash which makes use of wget to backup a private/restricted media wiki - for example on miraheze.org.

Prerequisites

In windows, install

  • gitbash
  • wget
    • Download wget.exe (32 or 64-bit) to C:\Program Files\Git\mingw64\bin\wget.exe (ensure the file is named "wget.exe")
  • Chrome browser

This should run natively in linux.

Instructions for use

Get cookie information

  1. Log into your restricted wiki using Chrome
  2. Open Web Developer tools (Ctrl+Shift+I)
  3. Click Network tab
  4. Browse to a restricted page (i.e. any page past the main index e.g. "EMIS")
  5. In the Developer tools, under "Name", click the document name of the link you clicked e.g. "EMIS"
  6. A side tab will appear. Click "Headers" tab.
  7. Within Headers tab, under "Request Headers", copy the "Cookie:" section (including the "Cookie: ")

Update script

  1. Edit backup_media_wiki.sh and change the top variables to your own output folder or media wiki website
  2. Paste in your cookie information into the script
  3. Run the backup_media_wiki.sh script in gitbash (drag and drop the script into gitbash and press Enter)

About

Back up all files, content, images from a restricted/private Media Wiki account (e.g. miraheze.org)

License:GNU General Public License v3.0


Languages

Language:Shell 100.0%