Backing Up Wiki: Difference between revisions

From GNU Radio
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:
# 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.  Performed using command-line tool dumpBackup.php, located in the maintenance directory.
# 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
## 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

Revision as of 06:19, 4 January 2020

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

  1. Database dump, e.g. mysqldump -h hostname -u userid -p --default-character-set=whatever dbname > backup.sql
  2. Create .tar of file system, which contains images and local config settings, e.g. tar zcvhf wikidata.tgz /srv/www/htdocs/wiki
  3. 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
    1. SSH into server that runs the wiki
    2. sudo docker exec -it mediawiki_mediawiki_1 /bin/bash
    3. cd maintenance
    4. php dumpBackup.php --full > /tmp/dump.xml
    5. exit
    6. docker cp mediawiki_mediawiki_1:/tmp/dump.xml /tmp/dump.xml
    7. now copy it somewhere safe =)