Linux-Windows rsync

Source: Internet
Author: User
Linux-Windows rsync-Linux Enterprise Application-Linux server application information. For details, refer to the following section. I. Linux

1. Install rsync (rsync 2.5.5)

The latest version is 2.4.6. You can choose to download from the original site: http://rsync.samba.org/ftp/rsync/

Compile and install

Rsync compilation and installation are very simple. You only need to perform the following steps:

[Root @ www rsync-2.4.6] #./configure

The [root @ www rsync-2.4.6] # make

[Root @ www rsync-2.4.6] # make install

However, you must install rsync on server A and server B, where server A runs rsync in server mode and server B runs rsync in client mode. In this way, the rsync daemon is run on web server A, and the client program is regularly run on B to back up the content to be backed up on web server.

Rsync server

1. rsync server startup

On web server A, you need to start the rsync server as A daemon. You only need to run:

[Root @ www rsync-2.4.6] #/usr/local/bin/rsync -- daemon

To start. The default service port of rsync is 873. The server receives anonymous or authenticated backup requests from the customer on this port.

There are several different methods to get the service up at startup, such:

A. Add inetd. conf

Edit/etc/services, add rsync 873/tcp, and set the service port of rsync to 873. Add/etc/inetd. conf and rsync stream tcp nowait root/bin/rsync? Daemon

Note: For xinetd, the setting method is similar.

B. Add rc. local.

Edit/etc/rc. d/rc. local and add:

/Usr/local/bin/rsync? Daemon

2. Rsyncd. conf file

Uid = root

Gid = root

Use chroot = no

Max connections = 4

Pid file =/var/run/rsyncd. pid

Lock file =/var/run/rsync. lock

Log file =/var/log/rsyncd. log

[Test]

Path =/www

Comment = backup client is redhat advance server 3.0

Ignore errors

Read only = yes

List = no

Hosts allow = 10.194.151.153 fe80: 213: d3ff: fea4: c744 % 4

Auth users = root

Secrets file =/etc/wwwuser. pas

3. encrypted file/etc/wwwuser. pas

This file can only be read and written by the root user. Note that for security purposes, the attribute of this file must be readable only by the owner; otherwise, rsync will refuse to run. We can set its property to 600:

[Root @ www/etc] # chmod 600/etc/wwwuser. pas

3. Start ?? Br/>
(On the server side, we need to start the rsync service: service xinetd restart)

After the file is configured, you need to start the rsyncd service on the master server:

[Root @ www/etc] #/usr/local/bin/rsync -- daemon

2. windows

1, install cwRsync tool, http://rsync.samba.org/download.html

CwRsync_2.0.10_Installer.zip

Rsync 2.6.9. OpenSSH 4.5p1 and OpenSSL 0.9.8d with security bugfixes

Run the following command:

(1) download command

D: \ Program Files \ csRsycn \ bin> rsync? Vzrtopg? Progress -- delete root@10.194.151.200: test/tmp

D: \ Program Files \ csRsycn \ bin> rsync? Vzrtopg -- progress -- delete root@10.194.151.200: test/tmp -- password-file =/etc/wwwuser. pas

(Create File test. pas on disk D with the password)

(2) Upload Command

D: \ Program Files \ csRsycn \ bin> rsync? Vzrtopg? Progress-delete/zbz root@10.194.151.200: test

D: \ Program Files \ csRsycn \ bin> rsync? Vzrtopg -- progress? Delete/zbz root@10.194.151.200: test -- password-file =/etc/wwwuser. pas (d directory zbz upload to linux .)

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.