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

Backing up with rsync

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 . [email protected]:ibook
 
 

The 192.168.3.237 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



Increase ad revenue 50-250% with Ezoic


More Articles by

Find me on Google+

© Tony Lawrence



Kerio Samepage


Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

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





If we define Futurism as an exploration beyond accepted limits, then the nature of limiting systems becomes the first object of exploration. (Frank Herbert)





This post tagged: