Rsync For Mac Os X



install-rsync-macosx.sh
#Compile rsync 3.0.7
#Follow these instructions in Terminal on both the client and server to download and compile rsync 3.0.7:
#Download and unarchive rsync and its patches
cd~/Desktop
curl -O http://rsync.samba.org/ftp/rsync/src/rsync-3.0.7.tar.gz
tar -xzvf rsync-3.0.7.tar.gz
rm rsync-3.0.7.tar.gz
curl -O http://rsync.samba.org/ftp/rsync/src/rsync-patches-3.0.7.tar.gz
tar -xzvf rsync-patches-3.0.7.tar.gz
rm rsync-patches-3.0.7.tar.gz
cd rsync-3.0.7
#Apply patches relevant to preserving Mac OS X metadata
patch -p1 <patches/fileflags.diff
patch -p1 <patches/crtimes.diff
patch -p1 <patches/hfs-compression.diff
#Configure, make, install
./prepare-source
./configure
make
sudo make install
#Verify your installation
/usr/local/bin/rsync --version
#By default, rsync will be installed in /usr/local/bin.
#If that isn't in your path, you will need to call your new version of rsync by its absolute path (/usr/local/bin/rsync).

commented Aug 2, 2019

Rsync is a rock solid, well proven, secure, fast, reliable and very accessible command line tool across platforms. RsyncOSX is just a GUI for executing rsync commands. Rsync is a command line tool with tons of parameters. Choosing the right parameter and to get the predicted result from rsync might be a challenge. RsyncOSX does the job for you. RSYNCRSH The RSYNCRSH environment variable allows you to override the default shell used as the transport for rsync. This can be used instead of the -e option. RSYNCPROXY The RSYNCPROXY environment variable allows you to redirect your rsync client to use a web proxy when connecting to a rsync.

Duck, thank you. I did a bit of googling around myself and found very little. I chosen OS X Extended (Journaled) to format the external drive and ran the rsync -a command. Files are copied over nicely and Created Date, Modified Date and Last Accessed Date are kept. Acrosync for Mac is a new rsync client for OS X with an easy-to-use GUI and Dropbox-like automatic upload. It can be also be configured to create hourly incremental network backups similar to Time Machine, but without the need to install server software. In any case I wanted to cover the special considerations that one might want to take under Mac OS X. I didn't really wanted just a guide of rsync. In any case, good link, it covers a lot of rsync but there is as of today a tool to do exactly that: rsnapshot. – Manuel Feb 1 '16 at 11:59.

when I execute make, this is the result:
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt -Wno-unused-parameter -c generator.c -o generator.o
generator.c:173:34: error: too many arguments to function call, expected 2, have 3
do_chmod(fbuf, mode | S_IWUSR, NO_FFLAGS);
~~~~~~~~ ^~~~~~~~~
./rsync.h:493:19: note: expanded from macro 'NO_FFLAGS'
#define NO_FFLAGS ((uint32)-1)
^~~~~~~~~~~~
./proto.h:305:1: note: 'do_chmod' declared here
int do_chmod(const char *path, mode_t mode);
^
generator.c:313:40: error: too many arguments to function call, expected 2, have 3
do_chmod(fname, fp->mode | S_IWUSR, NO_FFLAGS);
~~~~~~~~ ^~~~~~~~~
./rsync.h:493:19: note: expanded from macro 'NO_FFLAGS'
#define NO_FFLAGS ((uint32)-1)
^~~~~~~~~~~~
./proto.h:305:1: note: 'do_chmod' declared here
int do_chmod(const char *path, mode_t mode);
^
generator.c:1541:30: error: too many arguments to function call, expected 2, have 3
if (do_chmod(fname, mode, 0) < 0) {
~~~~~~~~ ^
./proto.h:305:1: note: 'do_chmod' declared here
int do_chmod(const char *path, mode_t mode);
^
generator.c:2121:32: error: too many arguments to function call, expected 2, have 3
do_chmod(fname, file->mode, 0);
~~~~~~~~ ^
./proto.h:305:1: note: 'do_chmod' declared here
int do_chmod(const char *path, mode_t mode);
^
generator.c:2126:51: error: too many arguments to function call, expected 3, have 4
set_modtime(fname, file->modtime, file->mode, 0);
~~~~~~~~~~~ ^
./proto.h:335:1: note: 'set_modtime' declared here
int set_modtime(const char *fname, time_t modtime, mode_t mode);
^
5 errors generated.
make: *** [generator.o] Error 1

commented Aug 2, 2019

Rsync For Mac Os X

commented Apr 17, 2020

You need to use https://rsync.samba.org/ (HTTPS instead of HTTP), else curl can't download the tars, or add the option -L

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

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!

Rsync Gui For Mac Os X

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.

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.

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.

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

Rsync For Mac

-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 Tips

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!