Wednesday, February 24, 2010

How to use 'cp' as a simple but reliable backup tool

The 'cp' tip is good but in the comments are some great examples of using rsync.

How to use 'cp' as a simple but reliable backup tool: "While looking for the perfect product to keep my photos safe, I discovered that sometimes simple is best. My requirements were simple: ensure that all my digital photos, stored on a locally attached USB drive, were duplicated to another drive attached to my AirPort Extreme. My photos are in RAW format (specifically DNG files) and will never change, so I only need to concern myself with new files.



I checked out numerous commercial and free products for backup, synchronizing and more, and nothing quite fit the bill. Whilst rsync could probably do the job, I couldn't get my head around the terminology to be sure I wasn't risking the original files. Then I discovered the solution. So mind-bogglingly simple, and no third-party software required. In Terminal, I run this command:

cp -npRv '/Volumes/LocalUSB/Photos/' '/Volumes/RemoteUSB/Photos/'


Yes, it is the standard Unix copy (cp) command with a few options:

  • n - Do not overwrite a...



    Add to digg
    Add to Reddit
    Add to Slashdot
    Email this Article
    Add to StumbleUpon



"



(Via MacOSXHints.com.)

No comments: