Upgrading rsync on OS X using Homebrew

Follow the instructions here: brew tap homebrew/dupes brew install rsync And then edit /private/etc/paths to put /usr/local/bin before /usr/bin. Edit: Warning: homebrew/dupes was deprecated. This tap is now empty as all its formulae were migrated. So, only brew install rsync is enough.

rsync prints “skipping non-regular file” for what appears to be a regular directory

Are you absolutely sure those individual files are not symbolic links? Rsync has a few useful flags such as -l which will “copy symlinks as symlinks”. Adding -l to your command: rsync -rtvpl /source/backup /destination I believe symlinks are skipped by default because they can be a security risk. Check the man page or –help … Read more

What do the numbers in rsync’s output mean?

When the file transfer finishes, rsync replaces the progress line with a summary line that looks like this: 1238099 100% 146.38kB/s 0:00:08 (xfer#5, to-check=169/396) In this example, the file was 1238099 bytes long in total, the average rate of transfer for the whole file was 146.38 kilobytes per second over the 8 seconds that it … Read more

How to change the owner for a rsync

If you have access to rsync v.3.1.0 or later, use the –chown option: rsync -og –chown=apache:apache [src] [dst] More info in an answer from a similar question here: ServerFault: Rsync command issues, owner and group permissions doesn´t change

rsync multiple remote directories to local machine preserving directory paths

Directly from the rsync man page: The syntax for requesting multiple files from a remote host is done by specifying additional remote-host args in the same style as the first, or with the hostname omitted. For instance, all these work: rsync -av host:file1 :file2 host:file{3,4} /dest/ rsync -av host::modname/file{1,2} host::modname/file3 /dest/ rsync -av host::modname/file1 ::modname/file{3,4} … Read more

How to use Rsync to copy only specific subdirectories (same names in several directories)

I’ve found the reason. As for me – it wasn’t clear that Rsync works in this way. So correct command (for company1 directory only) must be: rsync -avzn –list-only –include ‘company1/’ –include ‘company1/unique_folder1/***’ –exclude ‘*’ -e ssh user@server.com:/path/to/old/data/ /path/to/new/data I.e. we need include each parent company directory. And of course we cannot write manually all … Read more