2

I just configured an rsync server that is hosting the files I would like to replicate to a remote machine. Here is the rsyncd.conf file:

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

[share]
comment = share
path = /mnt/share
read only = no
list = yes
uid = root
gid = root
auth users = rsync
secrets file = /etc/rsyncd.secrets

I create a rsyncd.secrets file which looks like:

rsync:password

After I start the rsync daemon, I issue the following on the remote machine and I see the module

[remoteserver] # rsync  rsync://10.0.0.10
share  share

With the following setup, what command do I need to issue on the remote server (or the rsync server?) to sync "share" to the local "/tmp/share" for example.

Would it be something like this?

rsync -rv rsync://rsync@10.0.0.10::share /tmp/share
6
  • Answered your own question. The syntax of your rsync example is correct for pulling the data from the server and placing it in /tmp/share on the client. – Tim Aug 8 '12 at 17:11
  • @Tim: when i try that i actually get an error: ssh could not resolve hostname rsync – molecule Aug 8 '12 at 17:19
  • 1
    Don't know how I missed it, drop the rsync://rsync@ part. Should just be rsync -rv 10.0.0.10::share /tmp/share – Tim Aug 8 '12 at 17:25
  • @Tim: Thanks. Now I'm getting another error. auth failed on module share. Do I need to specify the password somewhere? I am not getting a prompt to enter a password on the client where I execute the command. – molecule Aug 8 '12 at 17:27
  • Does your password file have the correct permissions? Should be 0600 and owned by root. – Tim Aug 8 '12 at 17:38
1

The syntax is nearly correct, the format of the rsync server URL should be like host_or_ip::share_name.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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