Unix

Backups using rsync and ssh

Managing multiple *nix machines can often be a pain in the arse.  Backups are a must.  I have written a basic backup script to meet my basic needs.  It uses ssh and rsync, is capable of using ssh-agent - allowing for passphrase / phrase-less key usage ( handy for making it run out of cron ), runs pre/post operations - good for db backups.  It is not supported, and will only chaged when I need changes :D!

The entire setup, including example pre/post scripts can be found here. If you find it useful, feel free to send me a comment or suggestion ;).

Cheers › Continue reading

Wednesday, February 20th, 2008 Debian, Linux, Mac OSX, Scripts, Unix No Comments

Linux Home Automation

Using a simple $30 kit from x10.com, a bluetooth dongle and a bluetooth capable cell phone, one can easily setup some slick home automation.

A small application called bluemon allows for your linux machine to watch for bluetooth devices and run commands upon a quality of single you specify. The X10 kit I purchased came with a serial transmitter. This allows me to use bluemon to call bottlerocket, kicking on my lights when I enter a room.

Here is my config file for bluemon ( only changes shown ):

BLUEMON_ENABLE=’yes’
BLUETOOTHID=’aa:bb:cc:dd:ee:ff’
DISCONNECTHACK=-d

Once you have bluemon running, simply run the “bluemon-client” command. I use something like this:

bluemon-client -b aa:bb:cc:dd:ee:ff -u on -d off

off / on are simply shell scripts ( in $PATH ) that look kinda like this:

br -x /dev/ttyS0 -N
br -x /dev/ttyS0 -F

Good Times.

Thursday, October 4th, 2007 Automation, Debian, Unix No Comments