RSync Files to a Unix/BSD Backup Device from your Mac Laptop

My photo-taking workflow while on vacation usually involves taking a lot of photos daily, dumping them to a laptop, processing, then backing them up once I have returned home.
Previously, I accomplished this manually using BeyondCompare for Windows, as that would run on Windows Home Server.
Since moving to ZFS-based storage, however, this is no longer an option as BeyondCompare only has a Linux client (nothing for Unix/BSD).
There are other ways to get around this:

  • SSHFS and Meld – Complicated, somewhat bloated, but great BeyondCompare alternative
  • *Commander Utilities – Midnight Commander derivatives can accomplish similar tasks using the ctrl+x,d shortcut
  • Rsync – typically installed by default, easy to script

I chose Rsync as I wanted something more automated, but I do find myself using Midnight Commander from time-to-time to simply “get things done” when syncing files other than my images.

Here’s how I did it:

rsync -a -e ssh /volumes/PICTURES/ 'username@mymac:/Volumes/BIGRAID/'

Let’s break this down into smaller pieces:

rsync – this is the command that will do our heavy lifting and file comparison

-a – archive mode

-e – specify an RSH replacement

ssh  – use SSH

/volumes/PICTURES/ – this specifies the “Volumes” folder on my Mac, and the “PICTURES” drive within it. Replace this with the location of your items to backup

 – note the use of single quotes here. We’re using these in case there are spaces in the folder names, and we could have done the same above.

username@mymac – We’re logging on to the host “mymac” with the username “username”. You’ll probably want to change these. I use a hostname here, but you could just as easily use an IP address if you use static IP addresses.

:/volumes/BIGRAID/ – the colon denotes a subfolder on the server we are backing up to, and /volumes/BIGRAID in this case refers to a ZFS pool called “BIGRAID”.

Do you have a similar backup strategy for BSD/Unix targets that you would like to share?

How do I install .kext files?

I hear this a lot, and I myself have also gone looking for it…

So without  further ado, here is the script that will install kext files for you – be warned – you’ll need to know how to get the kext file in the first place, as well as the filename.

Easy right?

Let’s get started.

Open the Terminal application by going to Applications / Utilities / Terminal.app – you will see it in the Utilities folder – it looks like a command prompt.

Once terminal has launched, type in the following command:

sudo -s

Enter the root or first user password that you inputted during the setup process.

This tells it to run any other commands after this one as the root or superuser account, allowing you to edit files you normally would not have permission to edit.

Here’s an example using IOATAFamily.kext, a popular ATA driver. You’ll want to replace this by your own driver name. Also, you’ll want to make sure the file is unzipped, and sitting on your desktop. Oh one more thing, you’ll want to edit YOURUSERNAME with… your username 🙂

mv /Users/(YOUR USERNAME)/Desktop/IOATAFamily.kext /System/Library/Extensions
chmod -R 755 /System/Library/Extensions/IOATAFamily.kext
sudo chown -R root:wheel /System/Library/Extensions/IOATAFamily.kext
cd /System/Library/Extensions
rm -rf Extensions.mkext
rm -rf Extensions.kextcache

Hope that helps!