Home: rsync.samba.org
Environment: Redhat Linux 6.2, rsync 2.4.3 (download source compiles best),
Two Linux servers 192.168.11.7 (test) (rsync server), 192.168.11.2 (proxy) (rsync client)
Steps:
1. Download the latest rsync 2.4.3 source files compiled, see rsync.samba.org, as far as I know, only 2.4.3 support
Exclude options when mirroring--include and--exclude, compiled with an execution file rsync, just the execution file
2. Edit the configuration file/etc/rsyncd.conf as follows:
Log file =/var/log/rsyncd.log
PID file =/var/run/rsyncd.pid
Lock file =/var/run/rsync.lock
[Test]
Path =/test
Comment = Test folder
UID = root
Ignore errors
Read Only = yes
List = no
Auth users = Sun
Secrets file =/etc/test.scrt
Note: Defines a directory that needs to be mirrored for/test, requires a password connection, file in/etc/test.scrt,
Note the properties and permissions of the file-rw-------1 root test.scrt
[root@test/etc]# MORE/ETC/TEST.SCRT
Test:tset
3. Start Server Background rsync
# rsync--daemon
and add this line to/etc/rc.d/rc.local
# echo "Rsync--daemon" >>/etc/rc.d/rc.local
4. Set the client cron job on the server 192.168.11.2. Self-action backup or mirroring per night
0 * * 1-5/root/.test.sh
Note: Automatically run/root/.test.sh for backup every nine o'clock in the evening from Monday to Friday
Note: E-SSH indicates that the connection is encrypted with SSH, and server test is required to support SSH
5. Can be used for the following purposes:
A. Back up an entire directory on the primary server from another server, and exclude a subdirectory and file
B. Mirrors the home directory of the main Web server, suitable for image sites, with--delete to remove local files that are not on the server
It's really like, unlike Wget,wget. The local file does not download each file that the link points to according to the URL link of the site
Delete
Server data Synchronization server-side Cwrsync_server_2.1.5_installer.zip
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.