Entries from July 2007 ↓

Backing up to a remote server

If you aren’t me and/or don’t have a remote server, please move along. There’s nothing to see here. Unless you also would like to backup your files to a remote box or you are me and know that you will forget all of this goodness as soon as it’s done. In that case, read on…

Enable SSH access to the server without having to supply a password:

generate an RSA private key: ssh-keygen -t rsa

copy your public key to the server: scp ~/.ssh/id_rsa.pub user@example.com:~/

ssh to account: ssh user@example.com

append the public key to your authorized keys file and delete the file you uploaded:
mkdir .ssh
cat id_rsa.pub >> .ssh/authorized_keys
rm id_rsa.pub

set permissions:
chmod go-w ~
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys

You should now be able to ssh into the server without a password.

Run rsync

rsync -avz ~/source/ USER@SERVER:/foo/bar/destination

An AppleScript to run rsync automatically

do shell script “rsync -avz –delete-after ~/source/ USER@SERVER:/foo/bar/destination”

(“delete-after” tells rscync to delete anything on the remote server that no longer exists on your local computer)

Save as “remote_backup.scpt” in /Library/Scripts

Use iCal to run the AppleScript backup:

1. Launch iCal
2. Create a new calendar called “Scripting Cal”
3. Create a new event called “Remote Backup”
4. Set time to run
5. Set the alarm to “run script”
6. A new line will appear, asking you to point to the script you want to use. Navigate to “remote_backup.scpt” and click “select”
7. Set it to run 1 minute before the event
8. Set the event to repeat daily

Technorati Tags: , , , ,

There goes the damage deposit

Apartment Fire

So I’m sitting here chatting with MiHwa around 11 last night when I hear a commotion outside. I have long since learned to ignore the other humans around here as they tend to be idiots. Harsh, perhaps but evidence will be provided.

I hear the word fire and stick my head out. Nothing. Then sirens. Sweet feathery Moses, something is on fire. An apartment in the building across the street is apparently experiencing a combustion event. All the fire alarms that I hear are never fires and now there is a fire and no alarm. Excellent…

I watch from the window silently cursing all the ‘tard drivers who figure they can muscle past the fireman who are trying to put the damn thing out. After a while I finally decide to go down and join the throngs of people watching this. “Might as well grab the camera…”

So I go out and all I really see is a lot of smoke so everything seems in order. I take a few pictures. As I’m taking the one above, this guy walks up to me. “Do you know what is happening here?”

I lower my camera and look at him completely bewildered. I’m standing next to a fire truck. There are four in total, two ambulances, tons of fireman not to mention smoke and stuff.

“That apartment is on fire” and I point at the building. “Oh wow!” Now enlightened, buddy and the girls he is with immediately run over to the building, through all the cones set up to keep people from catching on fire and right up to the smoldering balconey. They were politely escorted off the lawn by a fireman. If it were up to me, I would have turned a hose on them.

Figuring that I would likely zip myself if had to talk to another asshat, I retired to my apartment only to find that the fan in my bedroom has been sucking diesel and smoke fumes for the past half hour. Within an hour it was all over. And not one cop.

Hovering

Hovering

It was far too quiet in the West End today. Thankfully someone had the foresight to send a pair of these to hover overhead all afternoon…