Thread: File syncing
View Single Post
allnameswereout's Avatar
Posts: 3,397 | Thanked: 1,212 times | Joined on Jul 2008 @ Netherlands
#17
Originally Posted by ctennenh View Post
I got a friend to help me set up a pair of keys. We set them up using my server (OS X) and copied the private key over. Apparently the permissions are the tricky part.
man ssh-keygen
man ssh-copy-id

It is really straightforward...

Here's my command:
rsync -au --delete username@server:/users/username/Dropbox /media/mmc1/Dropbox/
--delete is for bi-directional (2-way) syncing indeed. -v is useful to log what is happening or has happened.

I'd use -v for sure. Log the output to a file. If interested can use tail -f /path/to/log for live logging. Else, you have a trace for later. IOW, its meant to analyze before or during trouble... not afterwards 'considering it'. Else, you can log on the other side.

You need to be also sure there are not 2 of these commands running. See this example for a script.

Interestingly, he also digs a bit into rsyncd.conf which is useful too. For example, you can define directories with this. E.g. {local_dir} which is then a variable defined in rsyncd.conf. Saves typing and complexity.

There is also one problem with -u flag. If a file is modified on both machines the most recent version wins. Unison would give you a warning then. I'd want user interaction, and else don't do anything.

Furthermore, this guy posts a warning for rsync & bi-directional support. Maybe worth evaluating.

The -P flag is interesting too. It allows for resuming. Useful with large files.

Anyone used GIT for this purpose?
__________________
Goosfraba! All text written by allnameswereout is public domain unless stated otherwise. Thank you for sharing your output!