Recent Articles

Background Tasks (Why?)
A comp.unix.shell newsgroup post asked a neophyte question about how to run a script in the background.The terse answer was, of course, script &. While perfectly correct, that leaves out so much. I started to write what I thought would be a more complete response...

GoboLinux - A Breath Of Fresh Air?
My very first reaction to GoboLinux was negative. The underlying idea of taming the Unix/Linux file system hierarchy with symbolic links isn't new: heck, SCO did that way back with their 3.2v4.0 release, and for exactly...

The Influence Of Unix On NT
For several years now I've been looking for something Bill Gates said. Unfortunately I had misremembered the actual words, and every time I found someone who thought they remembered it, they had the wrong words too and I'd come up dry yet again. Finally this week...

More Reasons To Love Unix/Linux
I did a lot of clean-up work at this website over the long Thanksgiving weekend. This was all due to radically changing the layout. Some of that was quick and simple do do, but for older pages I needed to do some hand editing before switching to the new format. As I...

The 15 Commands Essential for Unix
Learning UNIX is a seemingly daunting task, there are thousands of commands out there, each with hundreds of options. But in reality you only need to know a few of them. I use unix quite a bit, usually either on one of our Linux servers, or on my Powerbook with OS X.

Reconsidering The Value Of OSS Indemnification
With Microsoft agreeing not to sue Novell SLES Support Subscription customers for patent infringement issues, maybe it's time to reconsider the value of OSS indemnification? I've stated previously that indemnification is not as valuable as the work...

Vi in a Nutshell
The unix text editor vi probably has more features than Microsoft Word yet I've only been using about 5 of them. Recently I've been learning a bit more about it. I now know some of the more handy features thanks to the VI reference in forth edition of Unix in a Nutshell which....


01.31.07


How to Backup Your Mac Incrementally Over SSH

By Pete Freitag

Do you have access to a shell account on a unix server with some spare space? If so it's pretty
easy to incrementally backup your files securely with SSH.

I titled this entry Howto Backup your Mac incrementally over SSH but this technique can also be used to backup any computer that can run rsync and ssh. They are already installed on Mac OS X, and most linux / unix servers.

Step 1 - Create a folder to store your backups on the remote server

mkdir backup

Make sure that your SSH user has permission to write to this directory.

Step 2 - Setup automatic authentication Optional

This step allows the backups to run without prompting you for a password when it runs. You can omit this step but you will have to type in your ssh password each you run backup.

I wrote an article called Setting up public key authentication over SSH that will guide you through this step.

If you own the server you might also want to create a user specifically for this process.

Low Rate eCommerce & Retail Plans

Step 3 - Use rsync to backup files incrementally

rsync -e "ssh" -rca --delete-after ~/test/ pete@myserver.example.com:backup

Now lets break it down a bit:

* rsync - this syncs the local directory to with the server directory.

* -e "ssh" - this tells rsync to use ssh if your want to pass in other ssh options such as port you can do that in the quotes: -e "ssh -p 12345"

* -rca recursive, checksum, and archive

* --delete-after - this will delete files on the server if you delete them locally.

* ~/test/ - I am backing up / syncing the test directory inside my home directory on my mac.

* pete@myserver.example.com:backup - my ssh username is pete, my remote ssh server hostname is myserver.example.com, and I am backing up into the directory ~pete/backup.

Excluding directories

Sometimes you might want to exclude a directory from being backed up, perhaps your Music directory since that is already backed up on your ipod.

rsync -e "ssh" -rca --delete-after --exclude=Music --delete-excluded ~/test/ pete@myserver.example.com:backup

Continue reading this article.


About the Author:
Pete Freitag (http://www.petefreitag.com/) is a software engineer, and web developer located in central new york. Pete specializes in the HTTP protocol, web services, xml, java, and coldfusion. In 2003 Pete published the ColdFusion MX Developers Cookbook with SAMs Publishing.

Pete owns a Firm called Foundeo (http://foundeo.com/) that specializes in Web Consulting, and Products for Web Developers.


About UnixProNews
UnixProNews is a collection of news and commentary designed to keep you in step with the ever evolving landscape of Unix environments. News and Advice for Unix Professionals

UnixProNews is brought to you by:

SecurityConfig.com NetworkingFiles.com
NetworkNewz.com WebProASP.com
DatabaseProNews.com SQLProNews.com
ITcertificationNews.com SysAdminNews.com
LinuxProNews.com WirelessProNews.com
CProgrammingTrends.com ITCertificationNews.com


-- UnixProNews is an iEntry, Inc. publication --
iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509
2007 iEntry, Inc. All Rights Reserved Privacy Policy Legal

archives | advertising info | news headlines | free newsletters | comments/feedback | submit article


News and Advice for Unix Professionals UnixProNews News Archives About Us Feedback UnixProNews Home Page About Article Archive News Downloads WebProWorld Forums Jayde iEntry Advertise Contact