Use rsync to Backup Your MacBook

I have a MacBook running OS X 10.4 (Tiger) which I needed to backup to an external USB hard drive. The simplest way for me to backup was using rsync. After plugging in the external drive, look for it under Volumes:

ls /Volumes/

You should see two or more drives listed, depending on what kind of setup you have. Once should be the default Machintosh HD and one should be your external drive; mine was called Mac. I had partitioned my external drive into two, one for Windows and one for Mac, and named them accordingly.

I wanted to backup my home directory under /Users. Say my username was macbook, then I wanted to backup /Users/macbook/. I used the following command:

rsync -vhrpEtlb /Users/macbook/ /Volumes/Mac/macbook-data/

The destination directory was macbook-data on the external drive in case different users wanted their own directories within the external drive. But what options did I use? v means verbose; h means human readable format; r means recursively backup data by going into subdirectories; p means preserve permissions; E means preserve the ability of executable files to be executed; t means preserve modification times of the files; l means preserve symbolic links; b means backup;

I also backed up my Applications directory, containing all installed applications, like so:

rsync -vhrpEtlb /Applications/ /Volumes/Mac/macbook-applications/

Serial Console Communication from Mac OS X

Serial cables and consoles are very important parts of a room full of servers and networking devices. They allow administration via command line, which I prefer for its depth and breadth of options. I use Mac OS X all the time. Since MacBooks don’t have serial ports, there has to be a way to still be able to make console connections. So you first need hardware. I have heard good things about Keyspan USB Serial adapter (USA-19HS). It has support for both Windows and Mac. Once you have installed drivers and plugged it in, you are good to go.

Now comes the software component. screen can be used to start a console session. But first you need to identify hardware. So run the following in Terminal.

ls /dev/tty.*

This will display devices, such as the Keyspan adapter. You will need the exact name of the device when using screen.

screen /dev/tty.xxxx datarate

where /dev/tty.xxxx stands for the device as shown when you did ls, and data rate is for the device you are connecting to. This should get you into the console of the device you are connecting to.

Hat tip: Serial Communication in OSX Terminal; Serial Com­mu­nic­a­tion in OSX Terminal; Openmoko USB serial with screen.

Useful Mac Apps

I use a MacBook and have installed some pretty useful applications over a period of time. They are listed below, with some explanation of why I find them useful.

Witch – it allows me to use alt-tab to move through all open windows, instead of cmd-tab which moves through applications only

Flip4Mac WMV – it allows me to view wmv files in QuickTime

RCDefaultApp – it allows to specify default applications for each file type

bbDEMUX – it allows to extract audio from a DVD vob file

MacTheRipper – it allows ripping a DVD to disk

UnRarX – it uncompresses rar files

MacVim – it is a Mac port of the vim text editor

TextWrangler – it is a text editor

Transmission – it is a bittorrent client

Chicken of the VNC – it is a VNC client

VMware Fusion – it allows running other operating systems as virtual machines

CoconutBattery – it shows details about the battery of my MacBook

iStat nano – it shows system statistics, such as CPU, memory, and disk usage in the Dashboard

Audacity – it is an audio editor

VLC – it is a media player

Cisco VPN Client – it is used to connect to a VPN handled by a Cisco device

Remote Desktop Connection – it is to be used to connect to a Windows machine using remote desktop

Stuffit – it is a compression utility

Zenmap – it is a network security analyzer; great to find holes in your own network for better security

KisMAC – it tries to break into wireless networks; great to improve security of your wireless network – it is a great and open source replacement for Microsoft Office

July 26, 2009 Update

Wireshark – a great tool to troubleshoot network problems

MacFUSE – extends file system capability

NTFS-3G – allows Linux and Mac to read and write NTFS

TeXShop – LaTeX for your Mac

Why am I not a Fanboy?

Let me be very clear from the beginning: I support open source wholeheartedly. I support GPL and BSD (two main open source “points of view”, as I see them) equally. I believe in the best tool for the job. This is why I am willing to support closed source as well.

The computing environment I deal with includes: Windows desktops and servers; Solaris servers; Linux servers; pfSense firewalls; Cisco Pix firewalls; and Cisco switches and routers. My primary workstation is a Windows desktop, which runs all kinds of open source applications, from Putty to OpenOffice, from Pidgin to Thunderbird, from Nmap to VirtualBox. At the same time, I use Cisco VPN client, SQL Server Management Studio, TOAD, PCAnywhere, and other closed source, proprietary applications. I do this because I am looking for the right tool for the job.

Linux/Unix servers I deal with are for various purposes: web server (Ubuntu), MySQL server (Ubuntu), load balance (CentOS), firewall (pfSense), Wireshark (CentOS), and proprietary applications (Solaris/CentOS). Any development that I need to do, I do using Python (in very rare case, C++).

To make things even more interesting, my notebook computer is a Macbook running Tiger. Again, I have a whole bunch of open source as well as closed source applications running on it. I surf the web using Firefox, listen to music on iTunes, watch movies on DVD Player, run virtual machines (Windows XP and CentOS 5.2) on VMware Fusion, try out Linux distributions by downloading them using Transmission, and so on.

I used Ubuntu exclusively as my desktop for about a year some time ago. I did not miss Windows at all. But now my requirements are changing, and so is my computing environment. I need all these applications to get things done, and if I feel more comfortable using them in a certain environment, why shouldn’t I?

Macs make excellent workstations. With the power of virtualization in hand, I can use Windows and Linux all at once. Same can be said for Windows and Linux themselves (except Macs can’t be run in virtual machines, for now). I wanted to be a Windows fanboy before I tried Linux. Then I wanted to be a Linux fanboy before I tried Mac. I wanted to be a Mac fanboy before I saw how good both Windows and Linux are becoming every day. There is so much interesting technology out there that it is the most interesting tech time ever. If only Mac OS can be run in VirtualBox or VMware or Parallels, we could have the best of all worlds: choose your favorite OS as your primary and then run all others virtually. Then you wouldn’t have to be a fanboy either.