An A-Z Index of the Apple macOS command line (OS X) Commands marked. are bash built-in commands. Bash is the default shell, it runs under Darwin the open source core of macOS. Links to other Sites, Books etc. “Mac OS X is a rock-solid system that's beautifully designed. Rsync is widely used for backups and mirroring and as an improved copy command for everyday use. Rsync finds files that need to be transferred using a lqquick checkrq algorithm (by default) that looks for files that have changed in size or in last-modified time. I did a backup to a remote NFS folder using rsync, from a Mac to a remote Debian system. The final backup is 58GB less than the original. Rsync says that everything was OK, and there's nothing to u.
- Mac Os Rsync Manual Pdf
- Mac Os Rsync Manual Downloads
- Mac Os Rsync Manual 2017
- Rsync Tutorial
- Mac Rsync Command
Mac Os Rsync Manual Pdf
Rsync is a program that behaves in much the same way that rcp does, but has many more options and uses the rsync remote-update protocol to greatly speed up.
Before We Get Started
Having spent over 20 years working with Macs both old and new there is a tool I recommend to every Mac Owner: CleanMyMac X, its simply best all-round problem solver for the Mac and it can quickly solve most performance issues covered on this site. So here is a tip for you, go Download CleanMyMacX right now and start enjoying a faster Mac today!
To keep multiple folders and thousands of files synchronised can be a real headache without a convenient method to automate the task.
Consider this scenario: you have several folders on your Mac that must be kept fully synchronised with an external USB memory stick, hard drive, or simply with another computer or mobile phone. Copying files manually can be just too time consuming and it’s easy to miss a few files, so inevitably you end up with multiple versions in each location.
On the Mac, it’s easy to synchronise any numbers of files and folders; the most common methods are:
On the Mac, it’s easy to synchronise any numbers of files and folders; the most common methods are:
- With third-party apps from the App Store
- With the built-in rsync Terminal utility
- With rsync in combination with Automator
METHOD 1: Third-Party Apps
There are a dozen or so third-party apps available in Mac App Store that can simplify and automate the process of keeping files and folders synchronised. Additionally, cloud-based services such as Dropbox can synchronise files on multiple machines very simply (note that the Mac version of Dropbox is only available from their website, not in the App Store).
For most people a third-party app is the most convenient and hassle-free method to sync your data, with the advantage that lots of features are provided such as the ability to sync files, music, pictures, bookmarks and other data.
Some of the most popular synchronisation apps are:
METHOD 2: rsync Utility
Rsync is a very useful utility built into Mac OS X which allows the differences between two sets of files to be synchronised. Rsync can also sync data over a network, so if your folders are on another computer this method can be tweaked slightly to use the relevant remote hostname.
To use rsync follow the steps below.
1. Open Terminal from the Utilities folder or Spotlight
2. In the Terminal window type rsync -aE –delete ~/ <source folder> / “<destination folder>”
For example:
![Mac Os Rsync Manual Mac Os Rsync Manual](https://bayton.org/wp-content/uploads/2018/07/rsync-1920x800.png)
rsync -aE –delete “~/Documents/” “/Volumes/Macbook Pro Backup/”
This example keeps everything in the Home Folder’s Documents directory synchronised with the external disk named MacBook Pro Backup and deletes anything in the destination folder which isn’t already in the source folder. This example creates a copy of Documents in the top level of the external disk’s folder structure.
Note: rsync is a very powerful tool that has dozens of command-line options, so it’s worth reading the user manual in more depth (in Terminal, just type man rsync and press Enter).
METHOD 3: rsync Utility + Automator
While rsync certainly gets the job done, it’s much more useful when combined with Automator to simplify the whole process. This method is particularly effective when you have multiple folders in different locations that need to be synchronised, because you can enter any number of rsync commands into the script.
1. Open Automator from the Applications folder or within Spotlight
2. Choose Workflow when prompted, as below
3. Search for the Run Shell Script action in the search field, then drag the icon into the main window on the right-hand side
4. In the Run Shell Script dialogue, change the Pass input drop-down field to as arguments
5. Under Options at the bottom of the workflow, make sure the checkbox labelled Ignore this action’s input is checked. The reason is that it’s just going to run as a standalone script and won’t take any files as input
6. In the Run Shell Script dialogue, delete any commands already included by default and replace them with the appropriate rsync commands. Make sure you specify the correct source and destination folders
7. Choose Save from the File menu and save the workflow as an application, then hit the Save button
8. Now just run the application you’ve created whenever you want to synchronise the selected folders
Note that it’s possible to add your sync app to the Login Items (under System Preferences -> User & Groups) to run every time you login, or to create a scheduled task to run the script on a regular basis.
You might also like to copy the application into the startup items folder to run every time your computer starts. The startup folder on your Mac is at //Macintosh HD/Library/StartupItems but note that in the case of an external drive or USB stick it would need to be connected to run successfully.
Mac Os Rsync Manual Downloads
Web Applications
CMS Applications
eCommerce Applications
Business Planning for Web Projects
Server Management and Hosting
Backing up data using rsync command
rsync is a great tool for backing up and restoring files. I'll use some example to explain on how it works.
Example of the remote server and folder that needs to be backup or copied:
Remote host name: server01.comentum.com
Remote folder: /home/user01/
Remote user: user01
rsync example for backing up / copying from remote server to local Linux computer:
rsync -arv [email protected]:/home/user01//home/bob/user01backup/
(/home/bob/user01backup/ is a local Linux folder path)
Example of the remote server and folder that needs to be backup or copied:
Remote host name: server01.comentum.com
Remote folder: /home/user01/
Remote user: user01
rsync example for backing up / copying from remote server to local Linux computer:
rsync -arv [email protected]:/home/user01//home/bob/user01backup/
(/home/bob/user01backup/ is a local Linux folder path)
rsync example for backing up / copying from remote server to local Mac computer:
rsync -arv [email protected]:/home/user01//Users/bob/user01backup/
(/Users/bob/user01backup/ is a local Mac folder path)
rsync example for backing up / copying from remote server to local Mac computer and external USB drive:
rsync -arv [email protected]:/home/user01//Volumes/westerndigital-usb/user01backup/
(/Volumes/westerndigital-usb/user01backup/ is an external USB Drive path on a local Mac computer)
Here is what the '-arv' option does:
a = archive - means it preserves permissions (owners, groups), times, symbolic links, and devices.
r = recursive - means it copies directories and sub directories
v = verbose - means that it prints on the screen what is being copied
rsync -arv [email protected]:/home/user01//Users/bob/user01backup/
(/Users/bob/user01backup/ is a local Mac folder path)
rsync example for backing up / copying from remote server to local Mac computer and external USB drive:
rsync -arv [email protected]:/home/user01//Volumes/westerndigital-usb/user01backup/
(/Volumes/westerndigital-usb/user01backup/ is an external USB Drive path on a local Mac computer)
Here is what the '-arv' option does:
a = archive - means it preserves permissions (owners, groups), times, symbolic links, and devices.
r = recursive - means it copies directories and sub directories
v = verbose - means that it prints on the screen what is being copied
More Examples:
rsync -rv[email protected]:/home/user01/ /home/bob/user01backup/
(This example will copy folders and sub-folder but will not preserve permissions, times and symbolic links during the transfer)
rsync -arv --exclude 'logs' [email protected]:/home/user01//Users/bob/user01backup/
(This example will copy everything (folders, sub-folders, etc), will preserver permissions, times, links, but will exclude the folder /home/user01/logs/ from being copied)
rsync -rv[email protected]:/home/user01/ /home/bob/user01backup/
(This example will copy folders and sub-folder but will not preserve permissions, times and symbolic links during the transfer)
rsync -arv --exclude 'logs' [email protected]:/home/user01//Users/bob/user01backup/
(This example will copy everything (folders, sub-folders, etc), will preserver permissions, times, links, but will exclude the folder /home/user01/logs/ from being copied)
Use of '/' at the end of path:
When using '/' at the end of source, rsync will copy the content of the last folder.
When not using '/' at the end of source, rsync will copy the last folder and the content of the folder.
When using '/' at the end of source, rsync will copy the content of the last folder.
When not using '/' at the end of source, rsync will copy the last folder and the content of the folder.
When using '/' at the end of destination, rsync will paste the data inside the last folder.
When not using '/' at the end of destination, rsync will create a folder with the last destination folder name and paste the data inside that folder.
When not using '/' at the end of destination, rsync will create a folder with the last destination folder name and paste the data inside that folder.
For Information Contact:
Comentum Corp
6222 Ferris Sq.
San Diego, CA 92121
Phone: 858-410-1500
Fax: 858-410-0707
Sales: 800-387-1920
Hours: Mon. - Fri., 9 a.m. - 5 p.m. PST
Contact Us »
Mobile App Development
iPhone, Google Android, BlackBerry, Windows Mobile
In-house development team.
San Diego, CA, USA.
In-house development team.
San Diego, CA, USA.