Robert Stackhouse

  • Home
  • About
  • Departments
    • Books
    • Design
    • Development
    • Leadership
    • Social Media
    • Society
    • Uncategorized
  • Subscribe via RSS

Use a Virtual Private Server and a Wiki to Host Your Mind Map

March 25th, 2009  |  Published in Uncategorized

I recently read Pragmatic Thinking and Learning: Refactor Your Wetware (Pragmatic Programmers), and in the book, Andy Hunt talks about hosting an all text wiki on a PDA for use as a mind map.  For those of us not into schlepping hand-held devices around or syncing them to desktops or the web, a VPS (Virtual Private Server), a wiki, and cron (for backup purposes) are a viable alternative.

I am a .NET Developer so doing this on a VPS has the added benefit of letting me work on my Linux-fu.

I used wget to download AutoMySQLBackup into /etc/cron.daily. Next, I chmod-ed the AutoMySQLBackup script file to make it executable. I opened the script in vi to set the database and email properties. Then I used aptitude (my VPS is running Ubuntu) to install mailx and mutt.  After that I used dpkg-reconfigure exim4-config to edit the Exim configuration (Exim 4 is an MTA and a dependency of mailx).

The AutoMySQLBackup script didn’t work for me straight out of the box (I think the script was written using an earlier version of mutt),  so I used aptitude to install ruby1.9 and ported (sort of) the script to Ruby.


require 'date'

$username = "username"
$password = "pwd"
$hostname = "hostname"
$outputfilename = "/backups/daily/#{Date.today.to_s}.sql"
$databasenames = "databasename"
$message = "Backup"
$subject = "Backup"
$emailaddress = "username@yourdomain.com"

puts `mysqldump --user=#{$username} --password=#{$password} --host=#{$hostname}
--quote-names --compact --databases #{$databasenames} > #{$outputfilename}`

puts `gzip -f #{$outputfilename}`

puts `echo "#{$message}" | mutt -s "#{$subject}" -a #{$outputfilename}.gz
-- #{$emailaddress}`

Finally I ran sudo ruby1.9 backupmysql to test the whole thing out.

I use Remember the Milk as my to-do list manager, and it lets you assign a URL to a task. So now, if I’ve done any research for one of my action items in my personal wiki, I can link to it from my action item in Remember the Milk.

Stumble it!

Leave a Response

Twitter Updates

    follow me on Twitter


    ©2010 Robert Stackhouse
    Powered by WordPress using the Gridline Lite theme by Graph Paper Press.