Installation notes for rsync synchronization files under javastuserver

Source: Internet
Author: User
A Is rsyncserver, started as the daemon, B is the backup machine, and used as the rsyncclient. Finally, crontab is used as A simple job, regularly run the file synchronization function on B. The installation and configuration of A are as follows: 1. apt-getinstallrsync may prompt that the system has been installed 2. configuration file/etc/rsyncd. conf does not have this configuration file by default, but it can be cp/usr/s

A is the rsync server, started as the daemon, B is the backup machine, and used as the rsync client. Finally, crontab is used for A simple job to regularly execute the file synchronization function on B.

The installation and configuration of A are as follows:

1. apt-get install rsync may prompt that the system has been installed

2. configuration file/etc/rsyncd. conf

By default, this configuration file is not available during installation, but you can copy the configuration file in the example by using cp/usr/share/doc/rsync/examples/rsyncd. conf/etc.

Vi/etc/rsyncd. conf has many parameters, but some of them can be ignored first.

[Ftp] Here is a module and multiple configurations can be configured. This is a default configuration provided by the system. The following is a configuration example on the local machine:

Bytes --------------------------------------------------------------------------------------------------

# So omit the "pid file" line completely in that case. pid file =/var/run/rsyncd. pid # syslog facility = daemon # socket options = # module options [share] comment = public archivepath =/var/www/pubuse chroot = nomax connections = 2 # lock file =/var/ lock/rsyncd # the default for read only is yes... read only = nolist = yesuid = nobodygid = nogroup # exclude = # exclude from = # include from = auth users = rsyncsecrets file =/etc/rsyncd. secretsstrict modes = yeshosts allow = 192.168.1.222 # hosts deny = ignore errors = yesignore nonreadable = yestransfer logging = yeslog format = % t: host % h (%) % o % f (% l bytes ). total % B bytes. timeout = 600 refuse options = checksum dry-rundont compress = *. gz *. tgz *. zip *. z *. rpm *. deb *. iso *. bz2 *. tbz
Bytes ---------------------------------------------------------------------------------------------

Here, the top is the pid file location. Then, a module named share is configured, and the maximum number of connections is 2, read only = no, which is specified as non-read-only (otherwise there will be permission issues during synchronization)
Auth users = rsync specifies a synchronization account named rsync. The authentication file for this account is/etc/rsyncd. secrets. Of course, we need to create this file.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.