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
Code:
/usr/local/bin/rsync -v pics/ root@192.168.1.1:/volume2/temp/
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.