Rsync Data Synchronization usage

Source: Internet
Author: User

Rsync is a powerful synchronization tool. Many projects provide http ftp rsync and other mirror methods. The official homepage of rsync is http://samba.anu.edu.au/rsync /. Rsync (d) Server start in two ways: 1. daemon 2. after xinetd is started, it is bound to TCP/873 port Java code % cat/etc/xinetd. d/rsync # default: off # description: The rsync server is a good addition to an ftp server, as it \ # allows crc checksumming etc. service rsync {disable = no socket_type = stream wait = no user = root server =/usr/bin/rsync server_args = -- daemon log_on_failure + = USERID} configure the primary Java code % cat/etc/rsyncd. conf motd file =/var/log/rsync/welcome. msg pid file =/var/log/rsync/rsyncd. pid lock file =/var/log/rsync. lock log file =/var/log/rsync/rsyncd. log [rsyncwww] comment = rsync www path =/var/www/use chroot = no max connections = 4 read only = false list = true uid = nobody gid = nobody # by www.jbxue.com auth users = wwwuser secrets file =/etc/rsyncd. secrets hosts allow = 1.1.1.1, 2.2.2.2 hosts deny = 0.0.0.0/0 ignore errors = yes transfer logging = yes log format = "% a % f % l" # log format = "% o % h [% a] % m (% u) % f % l "[rsyncroot] comment = rsync root path =/use chroot = no max connections = 4 read only = true # read only = false list = true uid = root gid = root auth users = rootuser secrets file =/etc/rsyncd. secrets hosts allow = 1.1.1.1, 2.2.2.2 hosts deny = 0.0.0.0/0 ignore errors = yes transfer logging = yes log format = "% a % f % l" rsyncd. secrets has one user name in one row: use the Java code rsync-auvPz -- progress dir1 dir2 rsync-ztruvoglpD -- progress dir1 dir2 rsync-ztruvoglpD -- progress dir1/dir2 rsync-upgrade -- progress dir1/file1 dir2 if you do not want to include directory/file can be set -- exclude remote use Java code rsync 1.1.1.1:: Only column list rsync user@1.1.1.1: rsync user@1.1.1.1: module rsync user@1.1.1.1: module/path if rsync server is not configured, you can use the Java code rsync-e ssh-auvPz 1.1.1.1 via ssh: /etc. /pay attention to the synchronization/the last problem do not put/the directory name also contains mirror put/only the contents of the mirror Java code rsync-ztruvoglp -- progress user@1.1.1.1 :: module/path. /For the convenience of script calling, you can also call -- password-file. Likewise, you can set the environment variable RSYNC_PASSWORD = to access rsync with user authentication.

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.