APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

Backing up with rsync

© December 2005 Tony Lawrence
December 2005

Rsync copies data to another directory, another disk volume, or another machine. It only copies what needs to be copied; that is, if a file hasn't changed since the last time you backed it up, rsync won't bother copying it again. Even better, if only part of a large file has changed, rsync only copies those bytes.

I don't see any point in calling rsync from Applescript, but if you must, you can. I'd just write a Terminal bash script. For my system, it looks like this:

 cd $HOME
 rsync -av -e ssh . tonyl@

The is a Linux server. I'm using ssh as the transport protocol. This backs up my home directory to the "ibook" directory under "tonyl"'s account on the Linux box.

If I were backing up to another directory or drive here, I might instead do:

 cd $HOME
 rsync -av . /Otherplace

If I were concerned about including resource forks, I'd add "-E":

 rsync -aEv . /Otherplace

Some like to use "-aEv --delete" to remove files on the archive that no longer exist here. I deliberately do not do that. I have plenty of space on the Linux box.

I prefer to run this manually, but you can also add it to cron or launchd, periodic tasks or even iCal.

If you must do this with Applescript, use "do shell script", but it's really silly to waste that overhead.

Got something to add? Send me email.

(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> Backing up with rsync

Inexpensive and informative Apple related e-books:

Are Your Bits Flipped?

Take control of Apple TV, Second Edition

Take Control of Upgrading to El Capitan

Take Control of Apple Mail, Third Edition

Take Control of IOS 11

More Articles by © Tony Lawrence

Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us

Printer Friendly Version

The problem of viruses is temporary and will be solved in two years. (John McAfee)

Linux posts

Troubleshooting posts

This post tagged:


Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode