Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have worked on rsync for the whole afternoon. I have set a rsync server,but I don't know how to use it.

I have two machines:66 and 12. 66 is the server,I want to back 66's data to 12,so I use rsync.

I have done the following:

In 66:

sudo apt-get install xinetd 

sudo vim /etc/xinetd.d/rsync 
service rsync 
    { 
        disable         = no 
        socket_type     = stream 
        wait            = no 
        user            = root 
        server          = /usr/bin/rsync 
        server_args     = --daemon 
        log_on_failure  += USERID 
    } 

sudo nano  /etc/rsyncd.conf 

max connections = 2 
log file = /var/log/rsync.log 
timeout = 300 

  [wwwroot] 
  comment = Public Share 
  path = /home/wwwroot 
  read only = no 
  list = yes 
  uid = nobody 
  gid = nogroup 
  auth userusers = user 
  secrets file = /home/rsync.secrets

sudo /etc/init.d/xinetd restart  

in 12:

rsync -v  user@192.168.1.100::wwwroot  /home/young001/backup --password-file=/home/rsync.pass 

and it tells:

skipping directory .

sent 4 bytes  received 6 bytes  2.86 bytes/sec
total size is 0  speedup is 0.00

the log is:

2013/06/12 03:18:18 [30477] name lookup failed for 125.221.225.12: Name or service not known
2013/06/12 03:18:18 [30477] connect from UNKNOWN (125.221.225.12)
2013/06/12 10:18:18 [30477] rsync on ctp/ from young001@UNKNOWN (125.221.225.12)
2013/06/12 10:18:18 [30477] building file list
2013/06/12 10:18:18 [30477] skipping directory .
2013/06/12 10:18:18 [30477] sent 98 bytes  received 54 bytes  total size 0
2013/06/12 03:19:59 [30484] name lookup failed for 125.221.225.12: Name or service not known
2013/06/12 03:19:59 [30484] connect from UNKNOWN (125.221.225.12)
2013/06/12 10:19:59 [30484] rsync on ctp/ from young001@UNKNOWN (125.221.225.12)
2013/06/12 10:19:59 [30484] building file list
2013/06/12 10:19:59 [30484] skipping directory .
2013/06/12 10:19:59 [30484] sent 98 bytes  received 54 bytes  total size 0

it seems to tell that the directory is empty,but I don't know which directory is empty.

/home/young001/backup is a empty directory,and /home/wwwroot is not a empty directory.

I want to sync wwwroot to backup,so where did I do wrong?

share|improve this question

1 Answer 1

Use "a" or another rsync option to actually do something other than checking:

rsync -av  user@192.168.1.......

By the way, you can simply use rsync and ssh for the job without installig an rsync server.

share|improve this answer
    
More specifically, it's hitting a directory at the top level and stopping because it was not told to run recursively. The -a flag implies recursive, but it's not failing because it is just checking. (That would be -n, --dry-run.) –  Aaron Copley Jun 12 '13 at 12:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.