Jump to content

User:Wanglong/Mw tools

From mediawiki.org

Web based management, backup and recovery for mediawiki (unofficial).

This backup and Recover are composed of two parts:

  1. Database Backup: use the mw_tools to backup the Database from your Database Server.
  2. Back up the website Program(include the images folder): Use FTP tools download all the folder on your webserver.
  3. Download and safekeeping all the backup.
Warning Warning: MW-TOOL allows anyone full accessed to your wiki database, including private information like email addresses and password hashes, and including the ability to overwrite your database! There is no protection whatsoever. You must yourself take measures to protect MW-TOOL from unauthorized access, e.g. by using http-authentication to password-protect the directory (basic instructions).

This is very dangerous to use unless you know exactly that you can effectively prevent unauthorized access!

Download

[edit]
  1. Download from here: http://www.allwiki.com/download/mw_tools.zip
  2. Make a directory: On your wiki server, you should make a directory where your Localsettings.php exist. For example, if you have /mw10/Localsettings.php, you should make a directory like /mw10/your-mw-tool(your-mw-tool may be any of you like)
  3. Extract and FTP: extract all files in the zip, FTP them to your tool directory.

Backup

[edit]

Copy or Upload the mw_tools in your Mediawiki install path.

  • change the 'mw_tools/templates_c' folder permission to '777'
  • change the 'mw_tools/backup/backup_files' folder permission to '777'

And type the URL in your browser like this:

www.xxxwiki.com/wikipath/mw_tools/login.php (The xxxwiki is your domain name, wikipath is the path you install your Mediawiki.) The browser should display like this:

This is choose language , click 'English',you will see:

Click System Tools at the top of the page ,and then click the Backup in the left,you will see the backup function:

Click the 'Start backup' in the bottom, according to the size of database ,about 10MB per second ,every database table will be a file.

you can see the backup is success , download the backup in the prompt path, safekeeping the backup ,use it when need to do the recover.

Recover

[edit]

Attention:The 'Recover' process will read LocalSettings.php and link to the database.

  1. If any tables have the same name as the backup tables, the old table(s) will be dropped.
  2. $wgDBprefix (in LocalSettings.php) must equal the backup table's prefix. Otherwise, the recovery may fail.

Upload the backup to the 'mw_tools\backup\backup_files' directory on the server. Be sure about the files and paths you upload, which looks something like this...

mw_tools\backup\backup_files\2008-02-20-16-03-38_grlgos\AllTableStructure.sql

mw_tools\backup\backup_files\2008-02-20-16-03-38_grlgos\allwiki_archive

mw_tools\backup\backup_files\2008-02-20-16-03-38_grlgos\allwiki_blobs

mw_tools\backup\backup_files\2008-02-20-16-03-38_grlgos\allwiki_brokenlinks
......

By clicking 'Recover', the program will read the backup files in the 'backup_files' folder and display the information about the backup. The results will look like this:

Choose the backup you want to recover, then click 'Import'... the recover process will start. The time recover process cost will depend on the size of your database. (On my server, 1Mb of data costs about 0.74 seconds.)

After importing the backup, the display will look something like this:

Other information

[edit]

if you want see more : you can visit http://www.allwiki.com/wiki/Allwiki%27s_Mediawiki_Backup_And_Recover%EF%BC%88EN%EF%BC%89

Link is dead. --Robkam (talk) 10:45, 12 December 2012 (UTC)

Programmer:--Wanglong 02:06, 11 March 2008 (UTC) ,this is the first program I write for mediawiki! If you have any problems,you can write your question or suggest to my discussion page :User_talk:Wanglong.