Grsync for Mac

Grsync is a visual tool to help you configure rsync. It is available for Windows, Mac, and Linux, takes minutes to configure, and automation is a snap.

Grsync can be used configure different backup sessions so that different backup jobs can be run on different schedules. Grsync can also utilize SSH keys for password-free authentication. Everything you need to get going is included in one download. With Grsync, your backups will be worry-free in no time at all!

Installation on Mac OS X (Leopard /SnowLeopard)

Installation of Grsync is a snap:

  1. Download Grsync for Mac.
  2. Double-click the downloaded .dmg file.
  3. In the installer window, drage the grsync icon to the Applications folder icon.

Generating an SSH Keypair with ssh-keygen

To create SSH key pairs with Mac, you need only to enter a few commands into the terminal. You'll want to run all of the commands here as the Mac OS X 'super-user' (root), so that you have full access to all the files on your machine. To do this, we preface each command with sudo, as shown below.

Enabling Administrator Access

Show Me
Enabling Administrator access in Mac OSX

Enabling Administrator access in Mac OSX

  1. Open the Control Panel and open Accounts.
  2. Select your username, and make sure that the Allow user to administer this computer is checked.

Creating the Key Pair

Show Me
Successful SSH keypair generation in Mac OSX

Successful SSH keypair generation in Mac OSX

  1. To begin, open Terminal in Finder > Applications > Utilities.
  2. Enter the following into Terminal to create a directory for backup files. We recommend /backup.

    sudo mkdir /backup

  3. To create the key, enter the following command into Terminal and press the Enter key:

    sudo ssh-keygen -f /backup/ssh_key -t rsa -N ''

    Note: The command ends with two single quote characters.

Uploading Your Public Key to Your EVBackup Account

Next, you'll need to upload the public key to your EVBackup account. Enter the following into Terminal (all on one line):

sudo rsync -e ssh /backup/


Show Me
Uploading your SSH keypair

Uploading your SSH keypair

  • Substitute user with your EVBackup account name.
  • When you enter this command, you are going to see a message because your computer is being introduced to the server. Just enter yes when prompted and you'll never be bothered again.
  • You'll be asked to enter the password for your EVBackup account. Once the key is uploaded and activated, this won't be necessary again.
  • If Terminal simply returns (looking as though nothing has happened), then you have successfully uploaded your key!

Activating Your Public Key

Next, you need to do is to activate your key on the EVBackup server. To do this, enter the following into Terminal:

ssh addkeys

The final thing that you need to do is test that you can login without a password. Enter the following into Terminal:

sudo ssh -i /backup/ssh_key

If you are successful, then something very similar to the following will appear in Terminal:

Last login: Thu Jul 15 16:16:44 2010 from c-28-26-13-101.
Copyright (c) 1983, 1986, 1988, 1990, 1991, 1993, 1994
The Regents of the University of California. All rights reserved.

[your-account@quark ~]$

Enter exit at the prompt and close Terminal. You're all set!

Configuring a Backup Session

Show Me
Setting Grsync preferences

Setting Grsync preferences

Now it's time to open up Grsync and get it configured. First, set your prefereneces by clicking the File menu, selecting Preferences. Here are a few suggestions for Grsync preferences:

  • ✓ Show rsync output by default
  • ✓ Show error list when finished

Saving a Grsync Backup Session

Show Me
Creating a Grsync session

Creating a Grsync session

The next thing to do is to create a backup session. Just click the add button on the toolbar.

  • Give your backup session a name that will be descriptive like, "PhotoShoots" or "Web-files".
  • You'll want to avoid using s p a c e s in your session names as they make automation a bit more difficult.
  • The source directory is the files that you will be backing up. Click the Open button to browse and select the root backup folder for the session.
  • The destination directory is your EVBackup account.
    For example, if your EVBackup account is, and you want to backup into the work-files folder on the server, then your destination will look like this:

Setting Session Options

Next, set the options that you'll need for your backup. Here's a few suggestions:

Basic Options tab:

  • ✓ Preserve time
  • ✓ Preserve permissions
  • ✓ Delete on destination (Use with caution!)
  • ✓ Verbose
  • ✓ Show transfer progress
  • ✓ Skip newer

Advanced Options tab:

  • ✓ Compress file data
  • ✓ Show itemized changes list

Selecting Your SSH Key

Show Me
Adding your SSH private key to Grsync

Adding your SSH private key to Grsync

Next, select the SSH key that you created and uploaded previously so that you can login to your EVBackup account without a password. To select your SSH private key:

  1. Select the Advanced options tab in Grsync.
  2. Add -e "ssh -i /backup/private_key" into the Additional options box:

    For example, if your name is Bob Smith and you stored your private key in /backup, then the Additional options might look like this:

    -e "ssh -i /backup/private_key"

Testing the Backup Session With a Simulated Backup

Show Me
A simulated backup in Grsync

A simulated backup in Grsync

Once you are configured, you'll want to do a simulated backup to make sure that everything is setup correctly. To simulate a backup session, select the Simulation option from the File menu.

  • If you see the files you expect to be backed up -- and you don't see any errors, then you are good to go!
  • If you need some assistance, then please let us know:

Once your simulated backup runs without errors:

  1. Go ahead and run your first backup: Click the Execute option from the File menu
  2. Save the session so you can automate it later.

Automating Grsync Backups

Once you have your backup script created and saved, you need only to add a cron job to automate it. To automate a cron job for your script:

  1. At terminal, add a cron job for the superuser:

    sudo crontab -e

  2. Enter the daily schedule command for -e backup-web

    For example, to run -e backup-web every night at 11:42 PM, you would enter:

    42 23 * * * open /Applications/ -e backup-web

    • What are the crontab fields? »
    • « Hide this

    The fields in crontab (separated by s p a c e s or tabs) are:

    [minute] [hour] [day of month] [month] [weekday] [command] [command args]
    Use commas to designate a more than one value: 00,09,11,22
    Use hyphens to designate a range of values: 0-6

  3. Save your crontab file and close your text editor. You\'re all set!

Should you have questions or need help:

A Grsync simulation is a "dry-run" in rsync parlance.

Show rsync options will allow you to see the contents of your logs as you backup.

Showing the error list is useful for troubleshooting. If you have a problem, enabling this option will bring it to your attention.

Enable logging is crucial if you want Grsync to create detailed logs of each of your backup sessions.

Preserve time will copy the time stamps from your files up to the server.

Preserve permissions will copy the file permissions set on your local files up to the server.

Use with caution!

Delete on destination will remove a file from the server once it has been deleted locally. You might want to setup a separate session to run weekly to clean up deleted files on the the server.

The verbose option will give you detailed logs about your backup session. These can be written to your backup files for later reference.

Show transfer progress will show a transfer progress bar indicating how your backup session is progressing.

Skip newer is useful if you backup the same file from multiple locations. This option will not backup a file if a newer copy can be found on the server.

Compress file data will zip your files during transit. This makes backup times much faster.

Show itemized changes will print a detailed list of each file that has changed in your source directory.

MS Windows Users: You will need to enter -i into Additional options to use this feature.

Protect remote args will prevent accidental (and probably unintended) program execution from file and folder names that are also shell commands.

MS Windows Users: You will need to enter -s into Additional options to use this feature.