Linux daily management-rsync backstage Service mode-1

Source: Internet
Author: User
Tags rsync

Rsync another way, write a configuration file, put in etc, through a command to start him, it will listen to a port, the client and the server to communicate.

The configuration file IP for the remote machine is 192.168.1.117

The name of the configuration file, written as this, is automatically loaded without pointing.

[Email protected] ~]# vim/etc/rsyncd.conf

port=8730 Port default 873 to specify

Log file=/var/log/rsync.log Journal file

PID File=/var/run/rsync.pid Each process has a PID

[denny]/////////below is the specific module-related configuration, module name

Path=/tmp/rsync//////////////////the specific configuration. module corresponding to the directory, does not exist on the creation.

Use Chroot=yes///////////////yes is True no is false true equals yes false equals No. Limit find home directory when syncing

Max connections=4////Maximum number of connections

Read Only=yes///Specify Yes or no to specify read-only not allowed write. If you want to push, write No.

List=yes////is allowed to list the name of the module.

Uid=root///Synchronize data with which user's identity

Gid=root

Auth users=wangshaojun////user authentication

Secrets file=/etc/rs.passwd///password file, can be written casually

The hosts allow=192.168.1.118////specifies which machines can be connected.


[Denny1]
Path=/tmp/rsync123
Use Chroot=yes
Max Connections=4
Read Only=yes
List=yes
Uid=root
Gid=root
Hosts allow=192.168.1.1

Any conditions that are not specified later can be

///////////////////////////////////////////////////////////////////////////////////////////////

1. Save the configuration file.

2. Start the configuration file,

3. View the process

4. View Port

[Email protected] ~]# Mkdir/tmp/rsync
[Email protected] ~]# mkdir/tmp/rsync123

Create a Directory

Create a password file below

[Email protected] ~]# VIM/ETC/RS.PASSWD

Format is module name: Password wangshaojun:123aaa

Set permissions

[Email protected] ~]# chmod 400/etc/rs.passwd

/////////////////////////////////////////////////////////////////////////////////////

Local 118 connection Remote 117

Port connection error is not specified.

To view port conditions for a remote machine

Specified port connection copy succeeded

View the log.

Linux daily management-rsync backstage Service mode-1

Related Article

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.