After configuring the rsync server, you can issue the rsync command from the client to implement various synchronization operations. Rsync has many functional options. The following describes common options: the Command Format of rsync
the/data/www directory on the host to the native/test directory: rsync-avz root @192.168.21.39:/data/www/test (Joben No test directory, it will be created automatically!) ) usage Two: Synchronize the/data/www directory on the host to the native/test directory but exclude log catalogue:Rsync-avz[email protected]:/data/www--exclude=*/log/*/test usage Three:synchronization host on the/data/www directory to the native/test directory, the n
. -suffix=suffix defines the backup file prefix. -U,--update only updates, that is, skips all existing DST, and the file time is later than the file to be backed up, not overwriting the updated file. -L,--links retains the soft-link knot. -L,--copy-links to handle soft links like regular files. --copy-unsafe-links only copies links to the SRC Path directory tree. --safe-links ignores links to links other than the SRC path directory tree. -H,--hard-links preserves hard links. -P,--perms maintain
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
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/work/*
Example1-rsyncrecursivelytoaunixserver
After the rsync server is configured, the Rsync commands can be issued from the client to implement a variety of synchronized
For Rsync has a very
Multi-functional options, here are some common options:
The command format for rsync can be:
1.
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
Today, when configuring the server sync amount, you need to eliminate some infrequently updated or folder content too much, improve synchronization efficiency, through the test through rsync Exclude-from can achieve nbsp;
Suppose the first command is like this Rsync-e ' ssh-p 30000 '-avl--delete--stats--progress demo@123.45.67.890:/home/demo/backup/ First, e
the/data/www directory on the host to the native/test directory: rsync-avz root @192.168.21.39:/data/www/test (Joben No test directory, it will be created automatically!) ) usage Two: Synchronize the/data/www directory on the host to the native/test directory but exclude log catalogue:Rsync-avz[email protected]:/data/www--exclude=*/log/*/test usage Three: Sync Host/ Data/www directory to the native/test directory, the native
Background introduction:The company's file server has multiple, one master server and 10 or so slave servers.When files in the master server are updated, the files in the slave server must also do the corresponding synchronization operations.The company is currently using Rsync synchronization, but synchronization time is inconsistent, so when the server update, it is necessary to manually synchronize each slave server.To automate this step, you have
Use the rsync command to synchronize data-Linux Enterprise Application-Linux server application information. The following is a detailed description. Considering server data security, I want to add a backup server to achieve better redundancy through data synchronization.
In linux, there is a very good command rsync t
Rsync and find is the Linux system comes with the command, if not installed can find the system installation disk or ISO file, there is a RPM package, install it. The concrete idea is as follows: 1) can realize the timing of rsync. The System timer task can take care of this matter, see the following URL: for example: #crontab-E 0 * * 1-5
Cross-server/client BACKUP command: rsync usage
Recently, we often need to deploy environments on a new server. Many things can be backed up directly from other servers without re-downloading and installing them.
The rsync command is used:
First, download rsync and instal
Let's say this is the first command.
Rsync-e ' ssh-p 30000 '-avl--delete--stats--progress demo@123.45.67.890:/home/demo/backup/
I. Exclusion of separate folders and files
To exclude the Sources folder, we can add the '--exclude ' option:
--exclude ' Sources '
The command is this:
Rsync-e ' ssh-p 30000 '-avl--delete
Remote Arbitrary Command Execution Vulnerability in rssh rsync-e
Release date:Updated on:
Affected Systems:Rssh 2.3.3Description:--------------------------------------------------------------------------------Bugtraq id: 56708CVE (CAN) ID: CVE-2012-2251
Rssh is the shell used in combination with OpenSSH. Only scp and sftp are allowed. Now supports rdist, rsync
stdout can be defined to the file object, tried, can be resolved:
Import subprocess
Import sys
import time
import random
import OS
import re
if __name__ = ' __ Main__ ':
cmdline = []
cmdline.append (' rsync ')
Cmdline.append ('--progress ') cmdline.append ('/kvmdata/kvm/vm_winxp/winxp.img ') cmdline.append ('/root/winxp.img ') Tmpfile = "./tmp/%d.tmp"% random.randint (10000,99999) #临时生成一个文件 fpwrite = open (tmpfile, ' w ') process = Subpro
There are many ways to synchronize data between two servers. My principle has always been enough. Using Rsync is more than enough to deal with the current project, and there is no need to build a more complex framework. The Rsync usage recorded here is quite a shanty, but it just records the experience that has been found out at ordinary times. If you really need to strictly use
Detailed parameters-a archiving mode, equivalent to-rlptgod- D is equivalent to--devices--specials-G Maintain group consistency before and after file transfer-L Keep Symbolic links-O Keep the owner consistent before and after file transfer-p maintain consistent permissions before and after file transfer-R Recursive Transfer-T maintain consistent modification time before and after file transfer-u do not overwrite the target file if the target file is modified more than the modified time of the so
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.