LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   pls help. rsync won't sync 2 directories on the same machine (http://www.linuxquestions.org/questions/linux-software-2/pls-help-rsync-wont-sync-2-directories-on-the-same-machine-877291/)

emanresu 04-26-2011 09:06 PM

pls help. rsync won't sync 2 directories on the same machine
 
Hi,

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.

Code:

motd file = /etc/rsyncd.motd
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock

[toydocs]
  path = /home/jim/rsynctoys
  comment = Jim's toy docs
  uid = 0
  gid = 0
  read only = no
  list = yes
  hosts allow = 129.0.0.1/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

Code:

jimbo:jimbo
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):

Code:

jim@jimac: rsync --recursive --progress --delete --verbose --dry-run rsync://jimbo@127.0.0.1:873/toydocs ~/toy2/
=============================
|  this is my rsync MOTD    |
============================
Password:
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.

jadrevenge 04-27-2011 10:26 AM

your "hosts allow" seems to have "129.0.0.1/0" not sure if that matters ...

what do you get from "rsync rsync://jimbo@127.0.0.1/" ?


All times are GMT -5. The time now is 07:18 AM.