Install rsync in Linux

Source: Internet
Author: User
1. download and install mkdir-p/root/softcd/root/softwget-cftp: // your

1. download and install

Mkdir-p/root/soft
Cd/root/soft
Ftp://ftp.samba.org/pub/rsync/rsync-3.0.8.tar.gz wget-c
Tar-zxvf rsync-3.0.8.tar.gz
Cd rsync-3.0.8
./Configure -- prefix =/usr/local/rsync
Make
Make install


======================================

Rsync server configuration:

1. create a folder:
Mkdir-p/etc/rsyncd/
Mkdir-p/home/aa


2. Create the main configuration file vim/etc/rsyncd. conf.

Log file =/var/log/rsyncd. log
Pid file =/var/run/rsyncd. pid
Lock file =/var/run/rsyncd. lock
# Port = 873

Uid = root
Gid = root
Use chroot = no
Read only = yes
Max connections = 5

# Hosts allow = *
# Hosts deny = *

[Aa]
Path =/home/aa
Ignore errors
List = no
Auth users = root, koko
Secrets file =/etc/rsyncd. secrets
Exclude = new/asdfg/


3. edit the password file, which is a plaintext text file: vim/etc/rsyncd. secrets
Root: 123
Koko: 123
Save and modify the file permission: chmod 600/etc/rsyncd. secrets


4. start:/usr/bin/rsync -- daemon -- config =/etc/rsyncd. conf


5. check whether Port 873 is available: netstat-naltp


--- Now The rsync server has been configured!

======================================

Rsync client configuration:

Create a file on the client to save the rsync server user password, vim/etc/rsyncko. pass
123 # Password defined in the server password file
Save and modify the file permission: chmod 600/etc/rsyncko. pass

--- Now The rsync client has been configured!

======================================

Client synchronization server command:
Rsync-vzrtopg -- progress -- delete root@192.168.1.105: aa/home/aa -- password-file =/etc/rsyncko. pass

========================================================== ================

Install cwrsync in Windows:

: Http://sourceforge.net/projects/sereds/files/cwRsync

1. after installation, add the installation directory to the path variable of windows, so that you can directly call the rsync command under the command line.

2. open the command line window and execute
Rsync-vzrtopg -- progress -- delete root@192.168.1.105: aa/cygdrive/e/koko

Now cwrsync starts to help us synchronize data!
Author: Magic World"

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.