About this wiki: Difference between revisions

From Federal Burro of Information
Jump to navigationJump to search
No edit summary
Line 32: Line 32:
gzip -f /data/backup/athena/athena.wiki.sql.backup.$NOW.sql
gzip -f /data/backup/athena/athena.wiki.sql.backup.$NOW.sql
</pre>
</pre>


crontab -l
crontab -l
  12  23 * * * /root/backupwiki.sh
  12  23 * * * /root/backupwiki.sh
== further reading ==
* https://www.mediawiki.org/wiki/MediaWiki_architecture_document/How_and_why
* http://highscalability.com/wikimedia-architecture

Revision as of 02:12, 30 June 2015

Config

Default install plus:

More:

$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'pdf', 'txt', 'vsd' );
$wgGroupPermissions['*']['edit'] = false;
$wgNamespacesWithSubpages = array_fill(0, 200, true);

Todo

How to Backup

Two parts: files and DB

/root/backupwiki.sh

#!/bin/sh
cd /var/www/www.quadratic.net/secure
NOW=`date +%a.%d.%b.%Y`
tar zcf /data/backup/athena/athena.wiki.file.backup.$NOW.tgz wiki && echo wiki file backup done || echo wiki file backup failed

mysqldump --host=localhost --user=wikiuser --password=eB7IaeOxn7o wikidb2 >  /data/backup/athena/athena.wiki.sql.backup.$NOW.sql  && echo wiki db backup done || echo wiki db backup failed
gzip -f /data/backup/athena/athena.wiki.sql.backup.$NOW.sql

crontab -l

12  23 * * * /root/backupwiki.sh


further reading