Hello to all! In general, there is Ubuntu Server, where I upload files. Rsync is also installed and configured. There is an Ubuntu client where I sync files from the server.

I enter the command on the client:

rsync -urlogt --delete-after user@192.168.56.10:/home/user/public_html /testsite/upload /home/user/Рабочий\ стол/ 

asks for a password and everything is synchronized.

Next, create a file with the password /etc/rsyncd.scrt

Then when you enter the command:

 rsync -urlogt --delete-after --password-file=/etc/rsyncd.scrt user@192.168.56.10:/home/user/public_html/testsite/upload /home/user/Рабочий\ стол/backup 

displays a message

accessing an rsync daemon

How to solve this problem?

  • The password-file option is available only when accessing rsync running in daemon mode. Your translator. - etki
  • I started to understand rsync only an hour or two ago. Does this mean that the client needs to run a "daemon" through a command, for example, /etc/init.d/rsync restart? - adamsafr
  • I never understood at all, but I think so. - etki

2 answers 2

Understood. It appears in the daemon configuration file the [upload] module name was written incorrectly. Used command:

 rsync -urlogt --delete-after --password-file=/etc/rsyncd.scrt adam@192.168.56.10::upload /home/adam/Рабочий\ стол/upload 

As a result, all hung on cron :

 */1 * * * * root rsync -urlogt --delete-after --password-file=/etc/rsyncd.scrt adam@192.168.56.10::upload /home/adam/Рабочий\ стол/upload 

    This command uses the openssh capabilities to connect to 192.168.56.10.

    to connect using openssh without entering a password, use key authentication.

    on the machine where you execute the above command, generate, if not yet (you can check by the presence / absence of the ~/.ssh/id_rsa ), openssh-key:

     $ ssh-keygen -t rsa 

    and then copy it into user@192.168.56.10 account:

     $ ssh-copy-id user@192.168.56.10 
    • Thank. Is it possible to use without openssh? In one tutorial there is a command to synchronize rsync -urlogt --delete-after --password-file=/etc/rsyncd.scrt backup@192.168.0.5::data /BACKUP/data . For example, I have a path to the backup folder /home/user/public_html/testsite/upload . I enter the rsync -urlogt --delete-after --password-file=/etc/rsyncd.scrt user@192.168.56.10::upload /home/user/Рабочий\ стол . Displays unknown module 'upload'. I do not understand where the error is: (( - adamsafr
    • yes maybe of course. but for this, firstly, you need to configure rsyncd on the “server” side, secondly, the rsync protocol, as far as I know, does not imply encryption, and thirdly, everything works fine and safe for you. - aleksandr barakin