rsync is a beautiful thing! August 6, 2006Posted by oktyabr in desktop, linux, pclinuxos, screenshots, ubuntu.
“rsync is a computer program for Unix systems which synchronizes files and directories from one location to another while minimizing data transfer using delta encoding when appropriate. An important feature of rsync not found in most similar programs/protocols is that the mirroring takes place with only one transmission in each direction.”
That’s from wikipedia: http://en.wikipedia.org/wiki/Rsync
Now before I get into the meat of this post let me qualify this by saying that I am NOT a linux guru and I don’t do IT for a living! I’m actually a truck driver (uhem… TEAMSTER!) most of the year and have basically taught myself what I know of nixfu as a hobby over the last few years. I love the challenges and the huge opportunities to learn new things that linux has offered me… but I certainly don’t know it all! For that reason this little story is one of the joy of discovery, problem solving and a sense of personal pride and acheivement. 🙂
So, a little background story…
I run several linux boxes on my home LAN at any given time. The one that stays the same the longest is my family print, file and music server. I also have another machine that I recently dedicated to linux pro-audio work and which I carelessly installed the latest Ubuntu Edgy “Eft” on… don’t get me wrong! Edgy WILL be a ground breaking release when it’s ready… but it certainly isn’t there yet! Anyway, I was having problems configuring network settings on my music box decided to check for updates that might fix the problem. 365 updates were already available (on a tangent, my Vista beta box has had ONE update in the last several weeks and is just as unstable!) so I pounced on them and installed them all. As a kernel upgrade was included (the one time rebooting a linux box is really important) I did just that… rebooted… and was greeted with a blinking cursor on a black screen. Something… possibly many things were now seriously broken. I tried several of the tricks I’ve learned from similar past experiences to no avail…
Now normally this wouldn’t be a very big deal. Worst case scenario all I would have to do is pick from the mountain of burned linux ISOs I keep on hand and reinstall something else on that box or even reinstall edgy back to it’s initial state. The problem was that previously this week I had a friend over for a few beers (ok, many beers!) As we both share an interest in music creation it wasn’t long before we had my keyboards and a few softsynths fired up and were running this particular music box through the wringer! At one point my friend went on some sort of furiously creative solo effort and I ended up recording over 20 minutes of his original attempts at music… reinstalling this box meant wiping the harddrive clean and banishing his artistic endevour to the scrambled bits and bytes of digital information heaven forever!
Ok, so the task was at hand… find a way to access the files on the harddrive and then transfer them to another box before reinstalling… REMEMBER that I said I was having network configuration problems? Yeah, make that network, permissions, and pam problems too. This was going to be tricky…
Just so happens that I had just downloaded and burned the new PCLinuxOS “MiniMe” ISO, a live CD, and decided that might be the ticket. Pop it in the music box drive, reboot and viola! Nice little distro, even if it isn’t a debian offspring 😉 (Review coming soon!)
Sure enough MiniMe could mount and see the harddrive… and the files! Unfortunately (no fault of PCLinuxOS, I’m sure) samba failed to be the ticket to transfer the music stuff to my server. Permission DENIED! Ok, a few more tricks in my *nixfu diciple’s handbook… nope, those didn’t work either… And the fact that I was sitting in a chair designed to play keyboard (the musical kind)… not the type used for computer work… and that I was doing all this on the music box’s dedicated 17″ monitor… anyway, it wasn’t ideally condusive for problem solving and since I was already neck deep in trouble with this one I thought “what the hell!” and moved over to my main machine, it’s 21″ flatscreen and it’s much more comfortable chair. Oh, and booted into Windows XP Professional, not linux! But before I did that I did one last thing on the trouble box… [root@localhost root]# /etc/rc.d/init.d/sshd start
Now sitting in my much more comfortable “command chair” I fired up the excellent windows telnet client PuTTY. NOTE: ANYONE who plays with linux boxes AND likes to still use Windows should definately have this excellent little app on their window’s desktop!
So… they say “a picture is worth a thousand words”…
That is a screenshot from my XP desktop… it basically shows three PuTTY windows… one, logged into my troubled music box, a second one logged into my server and a third, also logged into my server, just to have the man pages available for the wonderous thing known as rsync! 😀
Long (VERY long!) story made short… I logged into both machines to make sure that permissions were ok on both ends and then remotely moved the files via rsync from the trouble machine to the server. Problem solved!