Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-24-2011, 03:50 AM   #1
Registered: Sep 2003
Posts: 93

Rep: Reputation: 0
Question Need help with rsync + NAS local Folder

Hey Guys

So I am trying to setup a local rsync so that

It syncs with the picture folder on the local folder to the picture folder on /Volumes/pics

now i want it to do is

1) Mount the /volumes/pics if not mounted (ip address with auth), so that if I am not on the network / IP does not work it will not execute.
2) Do a rsync or somthing like that to sync between the two folders (with best options to do so)
3) if / when done.. umount the disk

and probably run it as a cronjob??

doing it on the rsync command on a mac..

plz help if any one has experience..

My main aim is to keep an active backup of the folder on my local NAS and keep it sycned.. any other method to do it from my mac to NAS will be helpful.. I know this is linux forum.. but i thought rsync command is linux based so can help

Last edited by khandu; 07-24-2011 at 03:51 AM.
Old 07-24-2011, 11:53 PM   #2
Registered: Jul 2009
Distribution: Slackware
Posts: 113

Rep: Reputation: 42
Here's one I typically use:
rsync --verbose --progress --stats --compress --rsh=/usr/bin/ssh --recursive --times --perms --owner --group [--delete] /sourcedir/*
Careful if you add in the --delete option. Definitely check out the man page for these to tweak it to your requirements (particularly if you want to add incremental backup or your login name configurations).

This is a good start too, but google is your friend.

Last edited by sysfce2; 07-24-2011 at 11:56 PM.
Old 07-31-2011, 10:30 PM   #3
Registered: Sep 2003
Posts: 93

Original Poster
Rep: Reputation: 0
Ok.. I m officially stuck

So I am trying to create a cronjob to sync a folder called pics to my NAS drive called temp (this is all for testing purpose)

What I have done is

1) Created a pub key of my Mac machine and transferred it to my NAS drive. So that I can do a rsync directly without a password --- done and working

2) I tried the command

/usr/local/bin/rsync -v pics/ root@
Using a compiled version of 3.0.8 rsync on Mac OSX (and therefore the path).The IP (eg) is my NAS drive. pics/ is my local folder on machine

Now it works great the first time.. but then say I delete some pics from my temp folder and then run the command again , it does not copy the missing files from pics to temp.. pics is going to my MAIN source all the time.

What I want to do is

1) Sync pics to temp
2) If files deleted from temp , next sync, they come back from pics.
3) If files deleted from pics, next sync, say move all those deleted files from temp to a new folder called say temp/deleted/DATESTAMP/ where datestamp is going to be the date of sync/delete (for record purpose).

Then I can keep checking deleted folder and manually move those files. The last step is not necessary if not possible or hard to implement.

Can u help me set up that kinda rsync command.


folder, mac, nas, rsync

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
automatically backup folder on Free NAS computer to another Free NAS computer tom treadway Linux - Newbie 1 01-26-2011 08:28 PM
rsync local web folder to remote web folder? Almost working... Ultrus Linux - General 2 03-25-2009 03:49 PM
Crontab rsync does not backup to NAS device Astol Linux - Software 1 09-24-2008 01:04 AM
how can i add a local Folder on local Hard Disk as Yum Repository ?? vahid_p Fedora 4 02-22-2007 11:43 AM
rsync to an off-the-shelf NAS JacekZ Linux - Networking 3 08-21-2006 09:32 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:15 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration