||04-26-2011 10:06 PM
pls help. rsync won't sync 2 directories on the same machine
I am learning to use rsync. I thought rsync could be used to sync up two directories, but for some reason, it didn't work for me. Could you please look at my settings and the command I used, and see if I did something wrong?
I've started an rsync daemon with the following settings in /etc/rsyncd.conf.
motd file = /etc/rsyncd.motd
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
path = /home/jim/rsynctoys
comment = Jim's toy docs
uid = 0
gid = 0
read only = no
list = yes
hosts allow = 22.214.171.124/0
auth users = jimbo
secrets file = /etc/rsyncd.scrt
strict modes = false
where /home/jim/rsynctoys has a directory tree with some files, and the file /etc/rsyncd.scrt says the following
when I tried to rsync with another directory on the same machine under the same account (~/toy2/, which is empty) as the destination, it would not sync up (see the dry run which says no difference between the two, but the source dir contains a few files and the dest dir is empty):
jim@jimac: rsync --recursive --progress --delete --verbose --dry-run rsync://email@example.com:873/toydocs ~/toy2/
| this is my rsync MOTD |
receiving incremental file list
sent 59 bytes received 405 bytes 61.87 bytes/sec
total size is 0 speedup is 0.00 (DRY RUN)
i am wondering why it doesn't try to copy the files to ~/toy2/. is it because I created the dest directory toy2 after I did the source dir ~/synctoys/ and populated files in it? but I didn't use the --update option in the command.
Please help. Thanks.