Rsync is a command-line utility shipped with every copy of Mac OS X. It originated from the UNIX/Linux world, where it has been part of most Linux distributions for many years. Rsync is reliable, fast, and easily configurable. Try running it by opening up the Terminal.app (located in your Applications/Utilities folder) and running the command. Five Mac Apps Worth Checking Out - August 2020 Apple Removes Fortnite, NEW Apple Watch & iPad Coming Very Soon, Apple One Subscription Bundle MacRumors Autodetect. Rsync is a command-line tool built-in to Mac OS X that allows you to synchronize files between two folders on a machine or between two machines on a network. Rsync is an incredibly useful tool that has been used by Unix administrators for many years.
Haul Data with Truck.app — The Rsync Client for Mac Still using FTP? Truck hauls data 30x faster thanks to its modern rsync engine (included) which compresses, de-duplicates and encrypts – giving significantly higher performance and security, right from the first transfer. The latest version of Rsync Server - Basic Edition is 2018.0 on Mac Informer. It is a perfect match for File Managers in the System Tools category. The app is developed by Bonhard Computing.
There’s a lack of good file copy utilities on Mac like there is for Windows (eg. Teracopy/Ultracopy). If I need to copy a bunch of files where I’m likely to come across errors copying, I’ll use rsync!
This guide covers how to copy files on a Mac using an external drive or any connected network drive. It’ll skip any errors and log all the failed copies to a file for you to check through. It’s especially handy for copying files while skipping errors, corrupted files and getting past some permissions errors.
Mac Rsync Examples
This is a beginner to intermediate guide and doesn’t cover some of the more advanced features of rsync.
Step by Step rsync for Beginners
Step 1: Open Terminal.app It is located in Applications/Utilities/
You can also open it the quick way by going to Spotlight and typing: terminal
Step 2: Type the following into Terminal, but do not press Enter. (note there is a space at the end of the command and the P is a capital letter)
Step 3: Drag and drop the SOURCE folder onto the Terminal window. This is the folder that has the items you want to copy.
Step 4: Drag and drop the DESTINATION folder onto the Terminal window. This is the folder you want the files to go to.
Step 5: Add the following to the end of the command (note the space after the destination folder):
Step 6: Press Enter!
You will see the files transferring as they go, if there’s a lot of files it’ll fly by pretty quickly. Just wait until it has finished.
At the end you will see a summary of how much has copied and how fast it went. How to delete apps from mini mac.
Checking for Errors
To Check for Errors, there is a file on your Desktop called rSyncErrors.txt, this will contain any errors during the copy and why they failed to copy.
What does the command mean?
rsync is a really powerful program that can do a whole lot of stuff, the command I wrote above is a very simple one designed to copy data quickly and easily without too much fuss.
Mac app development basics. Here’s a run down on the different parts of the command:
rsync -ahP {source} {destination} 2> ~/Desktop/rsyncErrors.txt
rsync — Runs the rsync command
-ahP — These are called Switches. They tell the program to run with particular options.
a – This tells it to archive, it will preserve permissions, modified/created dates and any other extra data with the file.
h – Human Readable. This tells it to display all the values in human readable form (instead of “112543662.08 bytes”, it will show “107.33MB”)
P – Progress/Partial – This is actually 2 commands in one. Progress will show you the progress of each file as it transfers (so you can see that it’s actually copying data). Partial will resume files that have been inturrupted part way through copying.
2> ~/Desktop/rsyncErrors.txt – This tells it to send any errors to the file on your desktop called rsyncErrors.txt.
Extra TipsRsync E Option
If you want to cancel an rsync part way through running, you can press Control-C to stop it. It won’t undo anything that has been done though, so you’ll end up with only part of the data copied.
rsync can resume from a failed copy. For example, if you’ve got a hard drive that tends to disconnect randomly, you can redo the command and it will resume from where it left off.
If you’re having trouble with permissions and copying files, you can run the command as sudo (type “sudo ” before the command). This will run it as an Administrator. Though with the settings I’ve specified, it’ll just copy the permissions errors along with it!
Advanced Version
(Skip this if you’re not sure what you’re doing!)
The terminal command to use rsync to copy files is:
Did this work well for you? Any problems? Please leave a comment below!
One of the most basic types of backup is the folder sync. Folder A lives on your Mac. Folder B is on an external hard drive. You want to make Folder B look exactly like Folder A.Granted, anyone could make this happen by dragging and dropping the contents of A to B. If you have a lot of data, that’s going to take a while each time, though.
Fortunately, there’s a really easy, free way to make this happen with almost no effort (or geekery) on your part using two tools that are already on your Mac: rsync and Automator.
rsync
rsync is a command line utility that works on lots of operating systems, including Mac OS X. It’s really great at backing up data and can do some powerful and mind-blowing things, most of which you need to know nothing about.
I’m using rsync in a very basic way. For example, this command copies all of the contents of my Documents folder (under my Home folder, the ~ sign) to an external hard drive called “Lacie500”:
rsync -aE --delete ~/Documents/ '/Volumes/Lacie500/Documents/'
It essentially does two things:
In other words, it makes the Documents folder on Lacie500 look exactly like the Documents folder on my Mac.
rsync + Automator
Since I didn’t want to have to run this command from Terminal each time, I created a very simple, single-action workflow using Automator.
Rsync Gui
As you can see, I’ve got it set up to mirror my Documents, Pictures, and Music folder.
I saved the Automator workflow as “sync.app” so so that I could just store it right on the external hard drive's root folder. That way, all I have to do is plug in the external hard drive, click on the hard drive in Finder, then double click the app. The sync just happens, and I never have to think about command line syntax again.
Why this is useful
For starters, backups happen if they’re easy. Automating backups is one way to make them really easy.
I have what I consider a pretty decent backup strategy involving Time Machine, Carbon Copy Cloner, and Dropbox. But as I keep accumulating miscellaneous hard drives (not sure how that happens), I want to make use of them. This is one way.
Stuff I read as I wrote thisComments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |