Sunday, June 10, 2007


Recently, I was looking for an easy way to do syntax highlighting of configuration files so I can easily post them to the web. Someone I know from UIUC pointed me in this direction:

Pygments has a live generator on the website as well as a Python script that can be downloaded. I encourage people to give it a try. I love it so far!

Thursday, June 07, 2007

mysql backup and restore

I recently had to make a backup of a db I use internally and migrate it to a different server. Luckily, Mysql has built in tools to help you out.

This is a very simple way to do it. The man pages will have more information on advanced usage.

To backup the database:

- mysqldump dbname -u username -p > outputfilename.sql

I then scp'ed the dump over to my new machine, and then restored it with:

- mysql dbname -u username -p < outputfilename.sql