Simple rsync guide

It amazing me how little I know when I set about tasks. So I’ve got a folder on one web server (the dev box) and I want it to update a folder on another server (the live site). In the verge of writing a script to do it, I’m told “why don’t you just use rsync?”. Yes indeed, why not.

So then. I need to to it over ssh do the -e flag needs telling that. Plus we’re essentially archiving so the -a flag brings together the -rlptgoD functionality (recurse, links, permissions, times, groups, owners, devices). Add in -v to show what it’s up to, and -z to compress the data, hopefully speeding things up and we’re left with something like:

rsync -e ssh -avzn /path/to/source username@serveraddress:/path/to/source

And this produces the error:
ssh: connect to host xx.x.xx.xxx port 22: Connection refused

Ah, well, yes. I think there firewall isn’t configured in that direction. So I’ll try it the other way round on the destination server.

Yes, it works, yay! :)

Technorati Tags: ,

Ranking well in Google

I meant to post this on this site, but ended up posting it on another one of mine. Anyway, in short, the post is aimed at people who claim ranking is simple in lesser engines but not in Google. Surely, if you can rank well in the other search sites then people WILL find you and and WILL link to you and you WILL rank well in Google. Anyway, I’m repeating myself now. The post can be found here:

The way to rank in Google is not to try and rank in Google

Technorati Tags: , , ,

Device is busy and is mounted multiple times

So, I’ve got a mount point that is used by a backup script, it seems that this script has been mounting the remote device via samba and not unmounting (umount) it at the end of it’s task. Now the server has it’s knickers well and truely in a knot. I know a good old fashioned reboot will sort it out, but I don’t want to do that.

umount as a normal user returns
[code]umount: it seems /mnt/o is mounted multiple times[/code]

When run as root it returns (6 times)
[code]umount: /mnt/o: device is busy[/code]
Continue Reading »

Technorati Tags: ,