Using the MediaWiki maintenance script called dumpBackup.php I want to create an XML dump of my MediaWiki.
To do this you have to login to the server using an SSH client, I’m using Putty (Windows), but I also tried it on OSX using Terminal.
According to the MediaWiki Manual for dumpBackup.php this is done using these commands:
cd w/maintenance
php dumpBackup.php --full >d:\backup.xml
Since I am using GoDaddy hosting the last line is a bit different for me. The reason is that SSH for GoDaddy by default still uses php4 (unlike the HTTP server). For this reason my command is (assuming you are also in the maintenance folder):
usr/local/php5/bin/php dumpBackup --full >d:\backup.xml
The however, all this does for me is print everything on the screen and no file is created. Does anybody know why this is and how to make sure the file is created.
You left out the
>from the original example:The
>tells the shell to redirect the output of the script to the filed:\backup\dump.xmlinstead of the screen.By the way,
d:\backup\dump.xmlis a Windows file name. Since your server seems to be using a Unixish OS (probably Linux), you probably don’t want to use that filename. However, if you don’t mind having the file created in your current directory, just plaindump.xmlwill work fine on both Windows and *nix.You could also try e.g.
~/dump.xmlor$HOME/dump.xml(both of which create the file in your home directory) or$TMP/dump.xml(which creates it in the directory designed for temporary files, usually/tmp.) This could be useful if you don’t have enough space available in the directory you installed MediaWiki in.To see how much space you do have, try the commands
df -h(which shows the amount of actual free space) andquota -vs(which shows how much of that space you’re allowed to use, if that has been limited). For more help with these commands, tryman dfand/orman quota.