Using PCLinuxOS (version not recorded).
See also:
Backing up MediaWiki ∞
files ∞
zip -r backup.zip httpdocs
This also zips the dotfiles.
database ∞
Dump the database. This'll prompt for the password. If you don't know it, it can be found in either of LocalSettings.php or AdminSettings.php
mysqldump -u username -p username_mediawiki > database.sql bzip2 database.sql
Restoring/Importing a MediaWiki backup ∞
install XAMPP ∞
(XAMPP)
https://www.apachefriends.org/download.html [ 1 ] was http://www.apachefriends.org/en/xampp-linux.html
su tar xvfz /home/user/Desktop/xampp-linux-1.6.7.tar.gz -C /opt /opt/lampp/lampp start
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
-
Then surf to
http://localhost
restore files ∞
Just replace xampp's default htdocs with your own. Nothing fancy needs to be done. You can even still access PHPMyAdmin with http://localhost/phpmyadmin after doing this.
cd /opt/lampp mv htdocs htdocs_ORIGINAL unzip backup.zip mv httpdocs htdocs
restore database ∞
cd /opt/lampp bzip2 -d database.sql.bz2 bin/mysql -u root --password=""
(MySQL)
# make an empty database DROP database username_mediawiki; CREATE database username_mediawiki; # make a user CREATE USER username IDENTIFIED BY 'password'; # permissions for your user GRANT ALL ON username_mediawiki.* TO 'username'@'localhost' identified by 'password'; # switch to that database USE username_mediawiki; # import database source database.sql; # exit ^d
FYI, to change that password later, do this in MySQL:
SET PASSWORD FOR 'username'@'%' = PASSWORD('password');
Now you repair your database. I'm not sure why this works, but it does! Note that this works as of 1.13.0 and perhaps one day it won't work.
cd /opt/lampp/htdocs/maintenance /opt/lampp/bin/php ./update.php
Notes ∞
- The database location, username, password are all found in: htdocs/LocalSettings.php and htdocs/AdminSettings.php
- The MySQL administrator (root) has no password.
- ProFTPD uses the password
lampp
for usernobody
. But ProFTPD should be turned off anyways - I don't bother with a user, I just use root since this is for a local installation.
-
The root MySQL password is empty.
Notes from previous restoration attempts ∞
- MediaWiki reinstallation notes - attempt 02 -- Checking out Bundled server software -- it works!
- MediaWiki reinstallation notes - attempt 01 -- using PCLinuxOS
-
MediaWiki reinstallation notes - attempt 00 -- using PCLinuxOS Business Edition - Server edition.
resources ∞
Footnotes
Last updated 2020-06-19 at 06:31:09
ported