rsync parameters, multi-directory transfer, data pull, push data

[Rsync parameters detailed explanation]
-v, --verbose verbose mode output
-q, --quiet streamline output mode
-c, --checksum open check switch, forced to verify the file transfer
-a, --archive filing mode, transfer files recursively expressed, and maintaining all file attributes, equal -rlptgoD
-r, --recursive subdirectories recursively processing mode
-R, --relative using relative path information
-b, --backup create a backup, that is, for the purposes already exists with the same file name, the old file is renamed ~ filename. You can use --suffix option to specify a different backup file prefix.
--backup-dir backup file (e.g., ~ filename) stored in the directory.
-suffix = SUFFIX backup file prefix definitions
-u, --update only be updated, that is, skip all file already exists in DST, and the file is later than the time to back up. (Do not overwrite the updated file)
-l, --links reservations soft link
-L, --copy-links would like to be treated the same as regular file processing soft link
--copy-unsafe-links pointing to other than only copy of the directory tree link path SRC
--safe-links pointing to ignore the path of the directory tree outside SRC link
-H, --hard-links preserves hard links
-p, --perms to keep file permissions
-o, --owner keep the file owner information
-g, --group keep the file is a set of information
-D, --devices holding device file information
-t, --times time to keep file information
-S, --sparse for special handling sparse files to save space for DST
-n, --dry-run reality which files will be transferred
-W, --whole-file copy files, not the incremental detecting
-x, --one-file-system do not cross file system boundaries
-B, --block-size = SIZE test algorithm block size, the default is 700 bytes
-e, --rsh = COMMAND specify rsh, ssh way data synchronization
--rsync-path = PATH specify where the information rsync command on a remote server
-C, --cvs-exclude using the same method and the CVS file automatically ignore, to exclude undesirable file transfer
--existing only update files that already exist in the DST, rather than backing up the newly created files
--delete delete those files not in DST SRC
--delete-excluded delete receiving end of the same files that are specified excluded this option
--delete-after after the transfer is complete before removing
--ignore-errors in a timely manner IO error also deleted
--max-delete = NUM ​​NUM deleted files up to
--partial keep those files for some reason is not completely transferred, so accelerate the subsequent re-transmission
--force Force remove directories, even if not empty
--numeric-ids does not match the user and group ID numbers for the user and group names
--timeout = TIME IP timeout in seconds
-I, --ignore-times not to skip those files have the same length of time and
When --size-only when deciding whether to back up files, regardless of file size only look Documents
--modify-window = NUM ​​window determines whether the file time stamp using the same, the default is 0
-T --temp-dir = DIR creates temporary files in DIR
--compare-dest = DIR DIR same comparison in the file to determine whether you need to back up
-P equivalent to --partial
--progress display the backup process
-z, --compress for file backup compression processing is performed at the time of transmission
--exclude = PATTERN exclude undesirable pattern specified file transfer
--include = PATTERN need not preclude the specified file transfer mode
--exclude-from = FILE exclude specified pattern file FILE
--include-from = FILE FILE, does not exclude that match the specified pattern
--version Print version information
--address bound to a specific address
--config = FILE specify a different configuration file, do not use the default file rsyncd.conf
--port = PORT specify other rsync service port
--blocking-io to use blocking IO for remote shell
-stats transmission status gives some files
--progress reality transmission process in the transmission
--log-format = formAT specified log format file
--password-file = FILE password obtained from the FILE
--bwlimit = KBPS limit I / O bandwidth, KBytes per second
-h, --help display help information
 
Chiefly directory transfer]

uid = root
gid = root
use chroot = no
max connections =5000
timeout = 600
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log
ignore errors
read only = false
list = false
hosts allow = 172.31.250.0/28
hosts deny = 0.0.0.0/32
auth users =
secrets file = /etc/rsync.password #touch /etc/rsync.password 和 vim /etc/rsync.password 和 chmod 600 /etc/rsync.password
#测试
[Test]
#path = /opt/test/

[Confluence-BAK]
#Confluence backup data
path = / var / atlassian / application -data / confluence / backups /

[Confluence-att]
#Confluence附件数据
path = /var/atlassian/application-data/confluence/attachments/

 
Pull data []
rsync -arvzogt [email protected]:/var/atlassian/application-data/confluence/backups/*  /var/atlassian/application-data/confluence/backups --password-file=/etc/rsync.password
 
Push [Data]
rsync -arvzuogt /var/atlassian/application-data/jira/data/attachments/* [email protected]::JIRA-att --password-file=/etc/rsync.password

Guess you like

Origin www.cnblogs.com/ccielife/p/11233816.html