Configure rsync for log synchronization notes

Source: Internet
Author: User
Because the system installs the rsync service by default, I will omit how to install the rsync installation server: mkdir-p/etc/rsyncd/Create The rsync main directory touch/etc/rsyncd. conf creates the master configuration file touch/etc/rsyncd. secrets create rsync letter...

 

Since the rsync service is installed by default, I will omit how to install rsync.

Server installation:

 

Mkdir-p/etc/rsyncd/create rsync main directory

Touch/etc/rsyncd. conf

Touch/etc/rsyncd. secrets create rsync information

Chmod 600/etc/rsyncd. secrets modify permissions

Touch/etc/rsyncd. motd create rsync instructions

Ls-lh/etc/rsyncd. secrets create a connection

Vi/etc/rsyncd. secrets modify account information

 

Xiaolu: 123456 username and password (no system account required)

 

 

Vi/etc/rsyncd. conf modify the main configuration file

 

 

 

Pid file =/var/run/rsyncd. pid is written into the pid of the process.

Port = 873 port number

Address = 192.168.20.167 server IP address

Uid = root

Gid = root

Use chroot = yes

Read only = yes permission read-only

Hosts allow = * allow all

Motd file =/etc/rsyncd. motd

Timeout = 300 timeout

Transfer logging = yes

Log file =/var/log/rsync. log access log location

[Log] Alias (used to synchronize the rsync directory)

Path =/qq synchronization folder location

List = yes

Ignore errors ignores io errors

Auth users = xiaolu authenticated user

Secrets file =/etc/rsyncd. secrets user password

Exclude = error_log httpd. pid exclude non-synchronization

 

 

/Usr/bin/rsync -- daemon -- config =/etc/rsyncd. conf

 

 

 

Client configuration:

Mkdir/etc/rsyncd/create rsync Directory

Touch rsyncd. password to create a password file

Echo "123456"> rsyncd. password append password

 

 

Rsync-avP -- password-file = rsyncd. password xiaolu@192.168.20.167: log/qq/

-- Password-file = rsyncd. password Manual synchronization command

 

 

 

Task plans can be made for regular synchronization !!!

Rsync configuration notes!

Writing is very fast, not very detailed!

 

This article is from the blog "flying birds with wings"

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.