For synchronizing feeds on both the local host and DMZ host, you can use the RSync utility. On a computer running Windows, the RSync utility can be run by using Cygwin.
All Linux commands below are run on Windows computers by using Cygwin.
To install the RSync utility on a Windows computer:
ssh-host-config
You can answer Yes
every time. The important point is to run the sshd daemon as a service.
net start sygsshd
The sshd daemon will start automatically.
To configure synchronization on the local host:
For this purpose, run the following command on the local host:
ssh-keygen -t rsa -q -N '' -f /home/<user>/.ssh/dmz_rsa_key
Specify the user login instead of <user>
. The keys will be created without a password.
ssh-copy-id -i /home/<user>/.ssh/dmz_rsa_key <DMZ_user>@<DMZ_host>
When you run this command, you will be asked for the password to <DMZ_user>@<DMZ_host>
.
rsync -a --delete-before --delay-updates -e "ssh -i /home/<user>/.ssh/dmz_rsa_key" <DMZ_user>@<DMZ_host>:/<Path_to_feeds>/ /<Path_to_feeds_on_Local>/
In this command, <Path_to_feeds_on_Local>
is the path to the folder containing feeds on the local host (namely, %service_dir%/feeds
), and <Path_to_feeds>
is the path to the folder on which updated feeds are stored on the DMZ host.
To pass the synchronization test, the contents of the <Path_to_feeds_on_Local>
folder on the Local computer must be the same as the contents of the <Path_to_feeds>
folder on the DMZ host.
When testing Rsync by using Cygwin, there can be problems related to space characters in a path, so it is recommended to do the following:
To reach the directory on the C:\ drive by using Cygwin, specify the path /cygdrive/c/
, and then the usual path (/cygdrive/c/Users/...).