Aug 25

I built a internal Mediawiki site for my company. A easy place to combine useful information. I recently came up with a backup script that I find rather useful and since I’m a nice guy I decided to share it, ok ok I have an alter motive I admit it! I’m a believer in open source, the more people editing the software the better it gets, so by all means, if you notice something about this script and you think “what an idiot he could have just done it this way and it would have been eaiser / more efficent. by all means let me know! =) thanks!

#!/bin/sh

#——————————————–
# CHANGE THESE OPTIONS TO MATCH YOUR SYSTEM !

wikiname=insight   # wiki name (used for backup filenames)
wikidb="wikidb"   # the database your wiki stores data in
wikidir=/var/www/   # the directory mediawiki is installed in
backupdir=~/bak   # the directory to write the backup to

#—————
# END OF OPTIONS

timestamp=`date +%Y-%m-%d`
db="$backupdir/$wikiname-$timestamp.sql.gz"
xml="$backupdir/$wikiname-$timestamp.xml.gz"
file="$backupdir/$wikiname-$timestamp.files.tgz"

#———————————
# Put the wiki into Read-only mode

echo
echo "Putting the wiki in Read-only mode…"
echo "$wgReadOnly = ‘Dumping Database, Access will be restored in ~ 1 min.’;" >> "$wikidir"/LocalSettings.php

echo
echo "creating database dump, $db…"
mysqldump –default-character-set=latin1 –user=XXXX –password=XXXX "$wikidb" | gzip > "$db" || exit $?

echo
echo "creating XML dump, $xml…"
cd "$wikidir/maintenance"
php -d error_reporting=E_ERROR dumpBackup.php –full | gzip > "$xml" || exit $?

echo
echo "creating file archive, $file…"
cd "$wikidir"
tar –exclude .svn -zcf "$file" . || exit $?

#—————————————–
# Put the wiki back into read/write mode

echo
echo "Bringing the wiki out of Read-only mode…"

head -n-1 "$wikidir"/LocalSettings.php > "$backupdir"/LocalSettings.bak
cat "$backupdir"/LocalSettings.bak > "$wikidir"/LocalSettings.php
rm "$backupdir"/LocalSettings.bak

#———————–
# Creating TAR archive

echo
echo "Creating TAR archive"

tar -cf $backupdir/$wikiname-$timestamp.tar $db $xml $file
rm $db $xml $file

echo
echo "Done!"

#—-
# END

written by Brandon Leon \\ tags: , , , ,

Aug 12

Thats right, as of 10:45 AM PST the Blizzard store is still down, good luck getting ahold of Blizzcon ticets. Hopefully we’ll get a hold of some today, guess F5 wil be our friend today.  blizzards last statement states:

Update: 10:30 AM PDT – We’ve made significant progress throughout the morning on implementing optimizations for the BlizzCon ticket website to better handle the load of purchase requests. We’re continuing to work on these updates, and we currently estimate that tickets will be available for purchase again after 12:00PM PDT today.

Further details regarding ticket availability will be posted on the World of Warcraft forums, and we’ll post another update here when tickets are up for sale again.

So start pounding F5 after noon!

further information and updates visit the following URL:

http://forums.worldofwarcraft.com/thread.html?topicId=8765782846&sid=1

for ticket sales (when it works) visit the following URL:

http://www.blizzard.com/store/details.xml?id=1100000202

written by Brandon Leon \\ tags: ,

Aug 12

Thats right, if you’ve been trying to get ahold of Blizzcon ticekts (or anything else from the store for that matter) your outa luck, This morning at 6:30AM PST when the tickets went on sale the flood of Blizzard fans attmpting to get there hands on blizzard ticekts brought the store down.

Blizzard reports after Maintaince and some upgrades that the servers will be ready today when they re release Blizzcon ticekts.

Were you lucky enough to get your hands on Blizzcon tickets during the first release on the 11th?

written by Brandon Leon \\ tags: , ,