Difference between revisions of "Backing Up Wiki"

From GNU Radio
Jump to: navigation, search
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
According to [https://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki this] there are three different things you want to backup:
 
According to [https://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki this] there are three different things you want to backup:
# Database dump, e.g. mysqldump -h hostname -u userid -p --default-character-set=whatever dbname > backup.sql
+
* Database dump, e.g. mysqldump -h hostname -u userid -p --default-character-set=whatever dbname > backup.sql
# Create .tar of file system, which contains images and local config settings, e.g. tar zcvhf wikidata.tgz /srv/www/htdocs/wiki
+
* Create .tar of file system, which contains images and local config settings, e.g. tar zcvhf wikidata.tgz /srv/www/htdocs/wiki
# XML dump, contains content of wiki, technically a subset of the information in the database backup but it's good to have in case the database backup becomes unusable due to version issues or whatnot
+
* XML dump, contains content of wiki, technically a subset of the information in the database backup but it's good to have in case the database backup becomes unusable due to version issues or whatnot.  See instructions below:
## SSH into server that runs the wiki
+
<SSH into server that runs the wiki>
## sudo docker exec -it mediawiki_mediawiki_1 /bin/bash
+
sudo docker exec -it mediawiki_mediawiki_1 /bin/bash
## cd maintenance
+
cd maintenance
## php dumpBackup.php --full > /tmp/dump.xml
+
php dumpBackup.php --full > /tmp/dump.xml
## exit
+
exit
## docker cp mediawiki_mediawiki_1:/tmp/dump.xml /tmp/dump.xml
+
docker cp mediawiki_mediawiki_1:/tmp/dump.xml /tmp/dump.xml
## now copy it somewhere safe =)
+
<now copy it somewhere safe>

Latest revision as of 02:51, 9 June 2020

According to this there are three different things you want to backup:

  • Database dump, e.g. mysqldump -h hostname -u userid -p --default-character-set=whatever dbname > backup.sql
  • Create .tar of file system, which contains images and local config settings, e.g. tar zcvhf wikidata.tgz /srv/www/htdocs/wiki
  • XML dump, contains content of wiki, technically a subset of the information in the database backup but it's good to have in case the database backup becomes unusable due to version issues or whatnot. See instructions below:
<SSH into server that runs the wiki>
sudo docker exec -it mediawiki_mediawiki_1 /bin/bash
cd maintenance
php dumpBackup.php --full > /tmp/dump.xml
exit
docker cp mediawiki_mediawiki_1:/tmp/dump.xml /tmp/dump.xml
<now copy it somewhere safe>