After configuring the Rsync server, you need to issue an rsync command on the client to back up the files on the server to the client. Rsync is a very powerful tool, and its commands have many special options. The following describes the options one by one. The Command Format of www.2cto.com Rsync can be as follows: rsync [OPTION]... src dest rsync [OPTION]... SRC [USER @] HOST: DEST rsync [OPTION]... [USER @] HOST: src dest rsync [OPTION]... [USER @] HOST: src dest rsync [OPTION]... SRC [USER @] HOST: DEST rsync [OPTION]... rsync: // [USER @] HOST [: PORT]/SRC [DEST] corresponds to the preceding six command formats. rsync has six different working modes: 1) copy a local file. This mode is enabled when the SRC and DES paths do not contain a single colon ":" separator. For example, rsync-a/data/backup 2) uses a remote shell program (such as rsh and ssh) to copy the content of the local machine to the remote machine. This mode is enabled when the DST path address contains a single colon ":" separator. For example, rsync-avz *. c foo: src 3) uses a remote shell program (such as rsh and ssh) to copy the contents of the remote machine to the local machine. This mode is enabled when the SRC address path contains a single colon ":" separator. For example: rsync-avz foo: src/bar/data www.2cto.com 4) copy files from the remote rsync server to the local machine. This mode is enabled when the SRC path information contains the ":" separator. For example: rsync-av root@172.16.78.192: www/databack 5) copy files from a local machine to a remote rsync server. This mode is enabled when the DST path information contains the ":" separator. For example: rsync-av/databack root@172.16.78.192: www 6) List of remote machine files. This is similar to rsync transmission, but you only need to omit the local machine information in the command. For example, rsync-v rsync: // 172.16.78.192/wwwrsync:-v, -- verbose verq, -- quiet streamlined output mode-c, -- checksum: Enable the checksum function to force file transfer verification-a, -- archive mode, indicating that the file is transmitted recursively and all file attributes are kept, which is equal to-rlptgoD-r, -- recursive processes-R in recursive mode for subdirectories, -- relative uses relative path information-B, -- backup to create a backup, that is, when the target already has the same file name, rename the old file ~ Filename. You can use the -- suffix option to specify different backup file prefixes. -- Backup-dir: backs up files (for example ~ Filename) is stored in the directory. -Suffix = SUFFIX defines the backup file prefix-u. -- update only performs updates, that is, skipping all files that already exist in DST and whose file time is later than the backup time. (Do not overwrite the updated file)-l, -- links retains the soft link-L, -- copy-links: process soft links like regular files -- copy-unsafe-links: only copies links other than the SRC path directory tree -- safe-links ignores the directory tree pointing to the SRC path other links-H, -- hard-links keep hard links-p, -- perms keep 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 performs special processing on sparse files to save DST space-n, -- dry-run which files will be transmitted-W, -- whole-file to copy files without incremental detection-x, -- one-file-system: Do not span the file system boundary-B. -- block-size = SIZE indicates the block size used by the algorithm. The default value is 700 bytes-e, -- rsh = COMMAND specifies to use rsh and ssh for Data Synchronization -- rsync-path = PATH specifies the path of the rsync COMMAND on the remote server-C, -- cvs-exclude automatically ignores files in the same way as CVS to exclude files that do not want to be transmitted. -- existing only updates files that already exist in DST, instead of backing up those new files -- delete those files that are not in the dst src -- delete-excluded also delete the files that are excluded by this option at the receiving end -- after the delete-after transmission ends delete -- ignore-errors and delete it when I/o errors occur in a timely manner -- max-delete = NUM delete a maximum of NUM files -- partial keep those files that are not completely transmitted for any reason, to accelerate the subsequent re-transmission -- force the deletion of directories, even if it is not blank -- numeric-ids does not match the number user and group ID as the user name and group name -- timeout = time ip timeout TIME, in seconds-I, -- ignore-times does not skip files with the same time and length -- size-only. when determining whether to back up a file, only check the file size, regardless of the file time -- modify-window = NUM determines whether the file is time-stamped, the default value is 0-T -- temp-dir = DIR. Create a temporary file in DIR -- compare-dest = DIR and compare the files in DIR to determine whether to back up-P is equivalent to -- partial -- progress display. backup process-z, -- compress compresses the backup files during transmission -- exclude = PATTERN specifies to exclude the file mode that does not need to be transmitted -- include = PATTERN specifies the file mode to be transmitted without exclusion -- exclude- from = FILE exclude files in the specified mode -- include-from = FILE do not exclude files in the specified mode of FILE -- version print version information -- address bound to a specific address -- config = FILE specify other configuration files, do not use the default rsyncd. conf file -- port = PORT specify other rsync service ports -- blocking-io for remote shell use blocking IO-stats to give the transmission status of some files -- progress actual transmission process -- log -format = formAT specify the log file format -- password-FILE = FILE get the password from the file -- bwlimit = KBPS limit I/O bandwidth, KBytes per second-h, -- help displays help information. Generally, azv option rsync-vzrtopg -- delete -- progress/root @ 192.168.1.3: test is used.