synchronizationSecrets file = rsyncd. secrets # Password file
Note:The format of the rsyncd. secrets configuration file is User name: Password, for example:Coldstar: 123456
Coldstar is added with a password of 123456.
Run the following synchronization command on a Linux Server:
Rsync-vzrtopg -- progress -- delete rsync: // coldstar@192.168.10.1: 52326/test2/root
Description1. Rsync Service EndSystem: CentOS 5.5IP Address: 192.168.21.160Data storage directory:/data/osyunwei2, Cwrsync ClientSystem: Windows Server 2003IP Address: 192.168.21.130Synchronized Directories: D:\osyunweiTo achieve the purpose:Cwrsync client automatically synchronizes data from/data/osyunwei directory in rsync server to D:\osyunwei directory every
1. synchronization between windows and windows1. Prepare two machines:Server ----- 192.168.0.201Client ----- 192.168.0.202 2. Download rsync for WindowsI also forgot the specific software download link, but I should be able to search it on Google.I also upload it to the cu ......
file:
cwrsync_2.0.10_installer.zip
Rsync Common Errors and command detailed parameters Rsync Common Errors: Problem 1: www.2cto.com @ ERROR: chroot failedrsync error: error starting client-server protocol (code 5) at main. c (1522) [handler ER = 3.0.3] cause: the directory on the server does not exist or has no permission. Creating a directory and correcting permissions can solve the problem. Prob
/data_bak/iis_bak/apiPOSIX style of writingIt's important to note that you can't write Windows style, or it will be an error, the beginning is /cygdrive The following is the path, and is / this / is a Linux style and not Windows style of8. Configuration of login passwordThe front is the username admin separated by a colon followed by a password650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/76/2
the next time it transmits only two different parts of the file.
Rsync supports most Unix-like systems, both Linux, Solaris, and BSD are well tested. In addition, it also has a corresponding version under the Windows platform, the more well-known are cwrsync and Sync2nas.
The basic features of rsync are as follows:
1. Can be mirrored to save the entire direct
(1) rsync (remote synchronize) is a data synchronization tool that allows you to quickly sync files between multiple hosts via Lan/wan, or use rsync to synchronize different directories on your local hard drive. (2) Rsync is a tool for replacing RCP, and rsync uses the so-called "
module, can define multiple [test]# module corresponding system directory, need to use/cygdrive + drive letter Path =/cygdrive/c/work# for Authentication Module User Name Auth users = testuser# Store the authentication password file, stored in etc under the Testuser.pas # file name can be arbitrarily taken, the content is user name: password, such as "testuser:123" Secrets file = etc/ Testuser.pasread only = falsetransfer logging = yes Start the service: Run-services.msc, locate the Rsyncserve
Soft link-L,--copy-links to handle soft links like regular files--copy-unsafe-links only copies links to links outside the SRC Path directory tree--safe-links ignoring links to the SRC Path directory tree-H,--hard-links reserved Hard link-P,--perms maintain file permissions-O,--owner keep file owner information-G,--group keep file group information-D,--devices keep device file information-T,--times keep file time information-S,--sparse special processing of sparse files to save DST space-N,--dr
[test2]
path =/cygdrive/d/wwwroot/ Yanghengfei_com
Read Only = yes
transfer logging = no
auth users = Coldstar #同步使用的帐号
Note:
The format of the Rsyncd.secrets profile is user name: password, such as:
coldstar:123456
That is, a user Coldstar was added with a password of 123456.
After installation, the service defaults to manual startup mode, and to Administration tools/service Management, start the "rsyncserver" service and modify "Rsyncserver" for automatic startup mode.
To perform sync
After the rsync server configuration is over, the next step is to issue an rsync command on the client to enable the server-side files to be backed up to the client. Rsync is a very powerful tool, and its commands have many feature options, and we'll analyze all of its options below.The
environment variable, so that you do not need to run the rsync command in the installation directory of cwrsync every time.
Rsync usage 3. When you need to connect to files in windows, the drive letter cannot be directly similar to c: \; d: \, and so on. Conversion is required:
Example:C:\WORK\*-->/cygdrive/c/wor
The general idea is:First export the SVN directory under Windows to a folder (so there is no extra. SVN directory), then package the directory as a *.rar file via WinRAR, and then sync the packaged file to the Linux server via the rsync command.
Introduce the basic environment first.
The code is as follows
Copy Code
#IP地址:
= False list = No Transfer logging = yes(2). Configure the authenticated user and password file: (the path is the same as specified above/cygdrive/c/rsync_db.ps is C-drive)The content is as follows: (this user is used to verify the client transfer file, the client needs to enter this password, the following text is written in the rsync_db.ps file)xcg:123456(3). At the command line, "Run" Input: Services.ex
files, enter the account password account that exists in the Linux system: password Five modify Etc/xinetd/rsync file to change disable = yes to disable = No six start the Rsync service based on the XINETD process #/etc/init.d/xinetd start Seven Windows machine installed cwrsync eight open 873 ports on Linux (the port that
Windows also has a similar to the UNIX under the Rsync software, recently I tried the Cwrsync software, the configuration and use of the method introduced, it is really easier to use it.
Sync rsync Server software download Cwrsync_server_2.0.10_installer.zip
Sync rsync Client software download Cwrsync_client_2.0.10
accounts directory and conf directory of the Turbomail mail server via the Rsync tool.Accounts directory: A directory for storing user-related informationConf Directory: User profile storage DirectoryNetwork topology structure1. Download the Rsync tool for Windows editionRsync version 2.4.6 (can get the latest version from http://rsync.samba.org/
cwrsyncserver_4.1.0_installer user name, password is you set password, my is AAA sun123456Click OK, right after this service, click Start ..., then shut down your firewall, the server side is like this.
Okay, let's talk about the client now.After the client double-clicks the Cwrsync_4.0.3_installer, and then the next step until the completion, remember to remember this installation path I installed the path is the default path C:\Program Files (x86) \cwrsyncAfter then set up a DataBackup
= inburst # The authenticated user name. If this row does not exist,
Indicates that it is anonymous.Secrets file = ETC/inburst. Pas # authentication file name
Generate a password file on the server. ETC/inburst. Pas
Open notepad
Inburst: hack
Save the files in the ETC file under the installation path and the files below as inburst. Pas
Start rsyncserver in the service and change the Startup Type to automaticIn this way, the server has been installed and configured.
Test from the c
Recently need to write a script to backup each server on the program to a designated server, originally thought to check the use of the rsync command 321 can be done, the results of the rsync command to support automatic login or to configure the service and parameters, and not sure the network said the configuration o
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.