Please visit the new Mac-Forums Facebook page:
Join Us @ Mac-Forums Facebook Page

Results 1 to 3 of 3
  1. #1
    rSync commandline bash script

    Wonder if anyone can assist. I have been a mac user for some time and previously a ubuntu linux user familiar with commandline and creating the odd script to run repetitive commands.

    I have been using my mac for sometime now and have vital files in one folder on my mac. I also have NAS on my home network and a share available for me to back my files up to.

    Using an command line application like rSync I would like to backup the contents of a particular folder (and sub directories) from lets say its "~/Pictures” to network share which lets say "/Volumes/Nas/Picarchive”. Is anyone able to help me with a command that will do this incrementally, only backing up file names.
    Any advice is appreciated

  2. #2
    rSync commandline bash script
    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Your Mac's Specs
    Early 2015 13" rMBP
    Rep Power
    Take a look here to help you construct the rsync command of your choosing.

    Are you looking to have this run on a schedule as well? If so, you'll want to leverage something like cron or launchd (the latter of which is OS X's scheduling system, the former being much simpler and the Linux nerd in me is supportive of that option). If this is something you want to do, let us know and we can help with that.

  3. #3
    rSync commandline bash script
    XJ-linux's Avatar
    Member Since
    Jul 02, 2007
    Going Galt...
    Your Mac's Specs
    Rep Power
    Here's a simple one I use to keep folders synced up via cron every 10 minutes:

    0,10,20,30,40,50 * * * * rsync -av /source/path/. /dest/path/. >> /place/for/logfile.log &
    Never judge a man, untill you have walked a mile in his shoes...
    That way you'll be a mile away from him, and you'll have his shoes.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Simple rsync script advice, please
    By Seventh in forum macOS - Operating System
    Replies: 0
    Last Post: 07-29-2011, 04:05 PM
  2. Newbie help with bash script to search and replace a filename
    By gilc in forum macOS - Development and Darwin
    Replies: 5
    Last Post: 02-25-2010, 05:23 PM
  3. Help with the bash...alias/script...?
    By Antares in forum macOS - Development and Darwin
    Replies: 2
    Last Post: 10-26-2009, 12:32 PM
  4. How Do I Get Finder to Execute a Bash Script?
    By mac57 in forum macOS - Development and Darwin
    Replies: 7
    Last Post: 06-08-2006, 03:01 PM
  5. Bash Script
    By ftjogoh in forum Apple Notebooks
    Replies: 1
    Last Post: 11-04-2004, 02:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts