About this wiki: Difference between revisions

From Federal Burro of Information
Jump to navigationJump to search
No edit summary
Line 22: Line 22:
Two parts: files and DB
Two parts: files and DB


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


  mysqldump -h localhost -u wikiuser -pXXXX wikidb2 >  /data/backup/athena/athena.wiki.sql.backup.$NOW.sql
  mysqldump -h localhost -u wikiuser -pXXXX wikidb2 >  /data/backup/athena/athena.wiki.sql.backup.$NOW.sql && echo wiki db backup done || echo wiki db backup failed
  gzip /data/backup/athena/athena.wiki.sql.backup.$NOW.sql
  gzip /data/backup/athena/athena.wiki.sql.backup.$NOW.sql
crontab -l

Revision as of 02:50, 19 October 2013

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 -h localhost -u wikiuser -pXXXX wikidb2 >  /data/backup/athena/athena.wiki.sql.backup.$NOW.sql && echo wiki db backup done || echo wiki db backup failed
gzip /data/backup/athena/athena.wiki.sql.backup.$NOW.sql

crontab -l