Sshd+rsync How to implement data synchronization

Source: Internet
Author: User
Tags mkdir rar rsync linux

Sshd+rsync to realize the principle of data synchronization is simple

The client connects to the server through SSHD, and the server synchronizes the data to the client

First look at the server's kernel information

Server Side

[Root@server ~]# Uname-a

Linux 2.6.18-194.el5 #1 SMP Tue 21:52:43 EDT i686 i686 i386 gnu/linux

Client Side

[Root@client ~]# Uname-a

Linux 2.6.18-194.el5 #1 SMP Tue 21:52:43 EDT i686 i686 i386 gnu/linux

First, both the client and the server need to configure the Yum source, where I use the local Yum source

Installing rsync and XINETD Services

[Root@server ~]# yum Install rsync xinetd-y

[Root@client ~]# yum Install rsync xinetd-y


[Root@server ~]# Vi/etc/xinetd.d/rsync

Change Disable=yes to Disable=no

and restart the XINETD service.

[Root@server ~]#/etc/init.d/xinetd Restart

stopping xinetd: [OK]

Starting xinetd: [OK]

The client server does the same operation

Client and server-side SSH services are turned on

[Root@server ~]#/etc/init.d/sshd Restart

stopping sshd: [OK]

Starting sshd: [OK]

On the server

[Root@server/]# Mkdir/data

[Root@server/]# Cd/data

[Root@server data]# mkdir Server

[Root@server data]# CD server/

[Root@server server]# pwd


[Root@server server]# Du-sh Test.rar

249M Test.rar

uploaded a file in the server Test.rar

Then create a new file

[Root@server server]# Touch TT

[Root@server server]# ls

Test.rar TT

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: 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.