This is a simple guide, made for my reference but carefully documented for others to also use.
Regarding MediaWiki version 1.15.1 or a little earlier.
See also:
Assumptions ∞
- My remote server is some random BSD or Linux server. I have root access to get the files and database in some simple way without jumping through stupid hoops.
-
My local server is PCLinuxOS and I have root access.
Backing up my MediaWiki database ∞
I cd
into my httpdocs/
folder, and do:
USER=your_username PASSWORD=your_password CHARSET=utf8 DATABASE=somename_mediawiki nice -n 19 mysqldump -u $USER -p$PASSWORD --default-character-set=$CHARSET $DATABASE -c > database.sql
Backing up my MediaWiki files ∞
tar -czvf files.tgz httpdocs
Transferring your backups to your new computer ∞
I personally just put my backup file somewhere where I can download it from the web, and on the destination server, I do:
wget example.com/files.tgz
Restoring my MediaWiki files ∞
Note that this'll overwrite files in the destination.
tar -xvvf files.tgz -C /opt/lampp/
This is a little wrong, since the source folder was "httpdocs" and the destination is "htdocs", but oh well.. you get the idea.
installing XAMPP ∞
[ 1 ] was www.apachefriends.org/en/xampp-linux.html
-
I downloaded XAMPP Linux 1.6.7
su tar xvfz /home/user/Desktop/xampp-linux-1.6.7.tar.gz -C /opt /opt/lampp/lampp start
It should end with this:
Starting XAMPP for Linux 1.6.7... XAMPP: Starting Apache with SSL (and PHP5)... XAMPP: Starting MySQL... XAMPP: Starting ProFTPD... XAMPP for Linux started.
Then run:
/opt/lampp/lampp security
And do this:
XAMPP: Quick security check... XAMPP: Your XAMPP pages are NOT secured by a password. XAMPP: Do you want to set a password? [yes] no XAMPP: MySQL is accessable via network. XAMPP: Normaly that's not recommended. Do you want me to turn it off? [yes] yes XAMPP: Turned off. XAMPP: Stopping MySQL... XAMPP: Starting MySQL... XAMPP: The MySQL/phpMyAdmin user pma has no password set!!! XAMPP: Do you want to set a password? [yes] no XAMPP: MySQL has no root passwort set!!! XAMPP: Do you want to set a password? [yes] no XAMPP: The FTP password is still set to 'lampp'. XAMPP: Do you want to change the password? [yes] no XAMPP: Done.
Ok, done.
/opt/lampp/lampp stopftp
Is everything healthy?
/opt/lampp/lampp status
Should say:
Version: XAMPP for Linux 1.6.7 Apache is running. MySQL is running. ProFTPD is deactivated.
Then surf to http://localhost
Restoring my MediaWiki database ∞
su /opt/lampp/bin/mysql --user root --password="" CREATE USER username IDENTIFIED BY 'password'; DROP database someword_mediawiki; CREATE database someword_mediawiki; GRANT ALL ON someword_mediawiki.* TO 'username'@'localhost'; USE someword_mediawiki source /opt/lampp/htdocs/database.sql (wait) ^d
/opt/lampp/bin/php /opt/lampp/htdocs/maintenance/update.php
testing everything ∞
surf to http://localhost
check out http://localhost/Special:Version
check out http://localhost/Special:Allpages
cleaning up ∞
rm -f /opt/lampp/htdocs/files.tgz rm -f /opt/lampp/htdocs/database.sql
The future ∞
(not sure)
Note: I only use this on a local computer which is not connected to the net!
Footnotes
^ 1 | was www.apachefriends.org/en/xampp-linux.html |
Last updated 2019-12-06 at 00:23:51