I was recently quizzed about the quickest, most efficient way to copy an entire directory between servers. I typically do this by tar’ing it up on one server, copying it to the other, then extracting it. However, this has a couple obvious problems. One, is that it requires large chunks of disk space to hold the archive file on both the source and destination. If you are low on disk space, this can be a real pain. The other bad thing, is that it a waist of time since it reads through all of the files three times (read, copy, extract).
The original thought I had was to use “scp -r” which will recursively copy a directory over to the destination. This, however, doesn’t copy directories that start with a dot, and it doesn’t preserve file ownership information.
The best way, is to use a combination of tar and ssh. The idea is to tar the files up to STDOUT, then create an SSH session to the remote host, and extract from STDIN. After you’ve got the idea, the command is pretty simple:
tar -cvzf – /path/to/local/dir | ssh root@remotebox “cd /path/to/extract; tar -xvzf -”
That’s it. One simple command and it can save you tons of time creating, copying, and extracting by doing it all at once.
I’ve been working with RoundCube, which is an Ajaxy webmail interface to an IMAP server. The software is still in beta, but I’ve been impressed with it so far. I’ve integrated into hooah.com‘s site, so that it matches the rest of their site and had to hack it up a bit to add some dynamic content. I’ve also just installed it for testing on another mail server that I use to see if I can find any bugs in it.
There are a couple features I’d like to see implemented. It would be nice to be able to change your email account password from the preferences section. Also, I’d like to set up a more transparent way to have it look up the backend server based on your email domain. Guess I’ll subscribe to their dev list and see if I can contribute any code.
I’ve just spent the last week or so replacing the core networking infrastructure where I work. It involved plenty of late-night work to avoid disrupting service during peak hours. We ended up replacing two of our major routers and implemented a simple tiered architecture which should allow the company to grow much bigger than they are currently.
Since starting work here, I have been the Cisco expert, because I had my CCNP certification (which has since expired). Although I did well on the exams, I had very little practical experience working on live routers. In the couple years that I have been working here, I have learned a lot about configuring routers and switches, and setting up BGP and OSPF routing.
I’ll probably won’t get into a job where these are my primary functions, but I think that its good to understand how networking and routing works. It makes debugging and troubleshooting much easier