Rsync R Your Friend

Need to sync some files? Locally or remotely? How about re-thinking an old friend, rsync?

You may be like I was, and have discounted rsync for a long time due to the security risk imposed by running the “r” daemon on your servers. Guess what? You can not only use rsync to sync up local directories on the same server (this can be real handy for backups), but you can also sync from one server to another via SSH rather than the rsync daemon. This would be much like scp, only you can sync whole directory trees.

So. Let’s say you want to sync two local directories, how would you do that? Well, if we are syncing /export/datadir to /export/backupdir it would look something like this:

rsync -aruv /export/datadir/ /export/backupdir/

It’s just that easy. Now, those command line switches, what do they do? Check it out:

a = archive
r = recursive
u = skip files that are newer on the receiving end
v = verbose, tell me what's going on

There is another one that is good when syncing between two separate servers, and that is the “z” switch. This tells rsync to use compression during the file transfer thus saving bandwidth. Let’s see what the above would look like from one server to another, as if you are running the command from the server you are syncing to:

rsync -aruvhz --progress server1:/export/datadir/ /export/backupdir/

There are a couple other options there, did you notice? I have added the “h” which tells rsync to output information in human readable format (GB, MB, K, etc), and the –progress which tells rsync to report exactly that, the progress of each transfer. You can use these with local transfers too, mix and match as you see fit.

Ubuntu Desktop Tricks

Anyone that saw how cool Beryl was on older Ubuntu releases will appreciate this.  It appears that Beryl has merged with Compiz and thus isn’t available for Ubuntu Hardy Heron (8.04) like you might be used to. That’s because it’s actually enabled by default!  If your system has an Nvidia card, and you have the “Restricted drivers” in use, you can right click on the desktop and choose “Change Desktop Backround”.  On the “Visual Effects” tab, you can enable the “Extra” settings.  This gives you some great effects for your windows and desktop by default, but what if you are like me and want more, especially to dig in and tweak it just the way you want it?  Glad you asked …

Pull up a command prompt and install the Advanced Desktop Effects Settings manager, after making sure you are fully up to date:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get install compizconfig-settings-manager

Once complete, this should add the Advanced Desktop Effects Settings icon to the System -> Preferences menu.  Click that puppy and go crazy!  You can setup all kinds on nifty stuff now, enjoy.

Using VNC Viewer, F8 is your friend

This is just a quick tip for anyone that uses VNC, expecially on Linux.  This works in TightVNC and maybe others too, it might be a VNC standard.  When using the VNC viewer or client on Windows, you can right click on the title bar of the window to get some extra options, like sending Ctrl-Alt-Del to the host to log into a Windows box.  When using this on Linux, right clicking on the title bar had no effect.  Uh oh, how was I going to login to my Windows box?  Well, I found that F8 will bring up the menu and allow you to do various things, including sending keystrokes to the host you are connected to.  So, there you have it.  When in doubt, try F8 when using the VNC viewer.

Installing Skype on Ubuntu 64 bit AMD

Here is a tip for anyone like me that is running 64 bit Ubuntu on AMD processors and wanting to install Skype.  This is what I ran into recently and I found a solution so I wanted to share.  This is a one liner that will take care of it for you, or at least it did with me on 8.04 Hardy Heron.

sudo apt-get install ia32-libs lib32asound2 libasound2-plugins;
wget -O skype-install.deb http://www.skype.com/go/getskype-linux-ubuntu;
sudo dpkg -i --force-all skype-install.deb;

See? That’s all there is to it! This installs some supporting libraries as well as Skype itself. I broke this into multiple lines at the semicolons so it would display properly, but you can run it all as one big command or seperately. Enjoy!

Got Skype?

OK, so I am late on this bandwagon, and I probably don’t have to tell you about it already. However, on the off chance that you haven’t tried or even don’t know what it is, let me tell you about something cool that I have been playing with. If you hadn’t guessed it already, it’s called Skype. Skype is a Voice over IP (VoIP) software package that allows you to not only text and talk from one computer to another (Skype to Skype), but also to call land and mobile phones and talk as well.

Not everything is free, Skype itself is free and Skyp to Skype communication is free, but calling real phones costs you something. Right now I am signed up with a plan that gives me unlimited minutes to the U.S. and Canada for $2.95 per month … how about that?

OK, let me give you the goods. First, how does it sound? It sounds great, I honestly cannot tell it from my regular phone and neither can those who I have called so far. Naturally this will depend heavily on the speed and quality of your Internet connection, but the technology itself seems solid.

Second, how much does it cost? Well, I have already mentioned the $2.95 for unlimited U.S. and Canada calls, they also have great rates for over seas and more. Outbound calling is quite reasonable it seams. If you want a number that people can call you on, and voice mail, that costs extra but the costs are not bad, especially if you have a subscription with them instead of simply paying as you go. Depending on where you live, availability of local numbers might be an issue.

The only downside is that you need to use your computer, so you are tethered to it. But wait! You can get a VoIP phone for under $60 that let’s you use it just like a cordless phone. Of course, you can spend more and get something fancier too.

All in all, I am liking my Skype experience, I’ll share more as time goes on but I suggest you check it out if you have any need to VoIP, chat or video chat software.

Sun Microsystems Drops SPARC Chip

OK, I admit that headline is a bit misleading, but it’s also true.  I spend time regularly working in an environment that is all Solaris UNIX running on SPARC chips, therefore we use SPARC based Sun Blade workstations exclusively.  This means that the platform we use to manage and develop on is the same as the platform we manage, which is a good thing when you are dealing with hundreds of mission critical servers.

I was speaking to one of my Sun contacts, enquiring about some workstations when I was informed that Sun has now dropped all Sun Blade workstations based on the SPARC chip.  You will only be able to buy workstations with Intel or AMD (x86) processors.

What!?  I personally think that’s stupid, and it puts me in a bind.  Before you flame, I know why they did it.  The SPARC workstations are expensive and I am sure they don’t sell very many so they decided it was more economical to stop making them altogether.  And yes, I know I can run Solaris x86, but why would I want to introduce a whole new architecture just for managing my existing systems?

Either way you slice this, I think it is a sign of the times.  Quality and performance will give way to cheap.  I read articles on the Web about how solaris is slow and the SPARC chip “sucks” because it “only” goes up to 1.5GHz or so when Intel goes over 3Ghz.  That just makes me smile because it just shows how little people know about how things work.

When you get right down to it, I guess it all comes down to money.