Wednesday, February 2, 2011

DMG backup, archive, and transfer to remote machine script

The following hint creates a .DMG of a given directory/folder, then uses SCP to move it from your machine to another machine. It also appends a date onto the .DMG name, and lastly sends you an email that it was transferred successfully (or not).

The script has a few assumptions:
  • The source machine can send you email from the command line, if Postfix is working correctly.
  • The source machine has a password-less SCP connection to the destination machine. If not, see this hint for help setting that up.
Once you've moved the script to a location on your machine, you'll need to make it executable by typing the following in Terminal:

sudo chmod +x dmgbackup-script.sh

Of course, the script can then be called via a cron job or other scheduler if desired. Thanks to BobHarris at the Apple.com » Support » Discussions » Mac ...

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

Source: http://feeds.macosxhints.com/click.phdo?i=0d1ffb89d71240bdcbce3165704ce58b

refurbished mac store apple shop uk app store search latest apple news

No comments:

Post a Comment