Linuxrsync synchronization from manual to automatic

Source: Internet
Author: User
Article title: Linuxrsync synchronization starts from manual to automatic. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Rsync is a fast incremental file transfer tool. it can be used for internal backup of the same host. we can also use it as a network backup tool for different hosts. This article mainly describes how to use an rsync server to implement file transmission, backup, and mirroring. Compared with tar and wget, rsync also has its own advantages, such as fast, secure, and efficient;

Manual:

First, you need to establish the public key and key between the two servers, so that you do not need to enter the password every time, you can also achieve automatic.

You can first use rpm-qa | grep rsync to check whether rsync has been installed, software download Rysnc home address: http://rsync.samba.org/

Test environment in this test (2 servers, one server, and one client)

Ip address of the rsync server: 192.168.48.60

Ip address of the rsync client: 192.168.48.148

-----------------------------------------------

Configure the server first:

1. install the rsync package

# Rpm-q rsync

Rsync-2.6.3-1

2. rsync only uses one configuration file:/etc/rsyncd. conf. This file is generally unavailable, so you can build it yourself.

# Vi/etc/rsyncd. conf

Uid = nobody

Gid = nobody

Max connections = 200

Timeout = 600

Use chroot = no

Read only = yes

Pid file =/var/run/rsyncd. pid

Host_allow = 192.168.48.148 // write the IP address of the client here

# Syslog facility = local7

# Log file =/var/log/rsyncd. log

# Rsync config

# The 'standard' things

[Rsync_gmmold] // defines the synchronization path (the client uses this keyword to link)

Path =/home // path to be synchronized

Comment = gmmold // unknown for the moment

3. start the service

#/Usr/bin/rsync -- daemon finally starts rsync on the server as a daemon. rsync starts at Port 873.

4. add to boot

Echo "/usr/bin/rsync -- daemon">/etc/rc. local

5. start during rsync check

# Ps-ef | grep rsync

6. stop the service

# Kill 'cat/var/run/rsyncd. Pi'

 

[1] [2] [3] Next page

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.