Dumping Seluruh Database MediaWiki

From OnnoWiki
Revision as of 18:53, 4 October 2016 by Onnowpurbo (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Untuk dumping seluruh database MediaWiki seperti Situs SpeedyWiki

Untuk 16.04

/usr/bin/mysqldump -u wikiuser -pwikipasswd wikidatabase --xml > file.xml
/usr/bin/mysqldump -u wikiuser -pwikipasswd wikidatabase -c > /var/www/html/pustaka/datawiki/wikidb.sql
tar czf /var/www/html/pustaka/datawiki/images.tar.gz /var/www/html/wiki/images/
tar czf /var/www/html/pustaka/datawiki/wikidb.sql.tar.gz /var/www/html/pustaka/datawiki/wikidb.sql
tar czf /var/www/html/pustaka/datawiki/wikidb.xml.tar.gz /var/www/html/pustaka/datawiki/wikidb.xml


Cara Lama

/usr/bin/mysqldump -u wikiuser -pwikipasswd wikidatabase -c | /bin/gzip -9 > /folder/data/datawiki/wikidb.sql.gz
tar czf /folder/data/datawiki/images.tar.gz /var/www/html/wiki/images


Agar dapat dilakukan secara periodik

  • masukan perintah di atas dalam script
  • beri permission agar dapat di execute script tersebut (chmod +x namascript.sh)
  • edit 'crontab -e' masukan agar script di execute secara periodik


Pranala Menarik