the file permission #-t: -- times keep the file timestamp #-l: -- links retains the symbolic link of the file #-g: -- group retains the file group #-o: -- owner retains the file owner #-D: -- devices keep the device file # (-a is equivalent to the sum of other attributes, that is,-p-t-l-g-o-d ...) #-e ssh: indicates the use of ssh protocol for bearer #-z: file compression and transmission # -- progress: Display progress bar # -- stats: shows how to perform compression and transmission
Two Rhel5.6web servers, which ran Apache, the directory is/va/www/html, now want to put online web data in real-time backup to another Web server, that is, this "another Web server" as a real-time standby machine, Here I refer to the Web machine on the line as the source server, as a real-time standby server called the target serverExperimental process:Part I: Configuring the target server:#service iptables Stop#setenforce 0#yum Install httpd#service
:
Incremental backup, only the modified content is transferred
Can be decompressed in real-time during transmission, reducing bandwidth consumption
Can keep the original file permissions, events, soft and hard links
Native replication supported, remote replication supported
3. Command parameters:-A represents archive mode, which backs up all content in the directory (including content in subdirectories), and maintains soft li
If the server disables password logon, you must use KEY,RSYNC-E "Ssh-i key" to resolve it, but the password requires non-interactive input (manual input), and scheduled task execution cannot be manually guarded.Combining expect can realize automatic input password
Instance Code
The code is as follows
Copy Code
#!/usr/bin/expectSet Timeout 30Spawn Rsync-avz--delete--exclude-from
,/etc/rsyncd.d/rsyncd.secretsService side of the password file, can write multiple users, here the.. 2.1.3/ETC/RSYNCD.D/MOTD the prompt text when the client is used.. 2.2 Start/usr/bin/rsync--daemon--config=/etc/rsyncd.d/rsyncd.confRun in daemon mode, the port is 873 inside the configuration file... 2.3 New directory, the user synchronizes the data directory, from the configuration file to see the directory is/BAC
Synchronization of mail server data using rsync under WindowsBackground environmentFor the system administrator, the usual focus should be on maintaining the normal operation of the system, to provide services, often involved in a data backup problem, in my understanding of the situation, 80% of the system administrators are not too concerned about the security o
, files are moved into the monitored directoryIn_create, create a new file or subdirectory in the monitored directoryIn_delete, file or directory is deletedIn_delete_self, self-deletion, that is, an executable file deletes itself when executedIn_move_self, self-moving, that is, an executable file moves itself at execution timeTest creationTest Deletetest off - writetest shutdown - when writing, creation can also monitorSimplified outputSometimes the restart will fail , so put it in the rc.local.
How to back up data using rsync in Linux
For various organizations and companies, data is the most important to them. Even for e-commerce, data is equally important. Rsync is a tool/software that backs up important data through the network. It is also a network protocol for synchronizing folders and files between systems through the network on Unix-like and Windo
have been accustomed to using rsync + SSH server file synchronization, but before the command parameters to find similar mkdir-p function, you can synchronize a specified file automatically on the target server to create a complete parent directory on demand. For example, some of the automatically generated directory files by month and year need to be synchronized when the file is generated:
Copy Code c
)[Home_21yunwei] # Custom namePath =/home/21 yunwei/# rsync server data directory pathComment = home_21yunwei # The module name is the same as the custom name of [home_www.osyunwei.com]Uid = root # set rsync operation permission to rootGid = root # set rsync operation permission to rootPort = 873 # default portUse chroot = no # The default value is true. Change i
Analysis of rsync synchronization speed using linux commands
Rsync is a data image backup tool in unix-like systems-remote sync. A Fast Incremental Backup Tool, Remote Sync, supports local replication or synchronization with other SSH and
deceitful act method to solve the problem.
Does the backup server require access to \\dbserver\LogBackup? So we are in the same network with the backup server (intermediate server) to share a path, for the backup server, as long as the access to \\dbserver\LogBackup, no matter who is sharing it.
The problem with the shared path is resolved, but the real purpos
During our daily O M, we often encounter the need to set up the rsync service, such as website file synchronization (image or backup), patch update, disaster Tolerance and backup for various different machine backups. If you write the rsync service as a script, you can have a basic service framework after the script i
@192.168.99.124:/qnap//qnap/
You can also configure the use of:: Qnap to use the [QNAP] module in the following configuration file/etc/rsyncd.conf:
sudo rsync-avrzp hua@192.168.99.124:: Qnap QNAP
hua@node1:~$ sudo rsync--list-only hua@192.168.99.124::++++++++++++++++++++++++++++++++++++++++++++++Welcome to use Quqi rsync services!++++++++++++++++++++++++++++++++
Rsync Introduction: Data Backup tool (with push-pull feature)Characteristics:The entire directory tree and file system can be saved in a mirror.It is easy to keep the original file permissions, time, soft connection and so on.Install without special permissions.Fast: When you synchronize for the first time, rsync copies the entire content, but only the modified f
First, the early topology map planning
DNS dual NIC; eth0:192.168.6.248 eth1:192.168.7.248
Telecom users: 192.168.6.X this network segment analog IP address 6.248 6.244
Unicom Users: 192.168.7.X This network segment analog IP address 7.248 7.244
Other users: any
Site Cluster Address:
Telecom Access: 192.168.1.1 192.168.1.2
Netcom Visit: 192.168.2.1 192.168.2.1
Other users: 192.168.3.1 192.168.3.1
Second, the configuration of rsync services,
Windows as a file server, using the Windows service version of rsync: Cwrsyncserver Download Address: http://rsync.samba.org
The setup process is to set the account number and password for the system service, which you can default to.
Note: This account is used to enable the Crsync Server service, you need to assign the account to the corresponding permissions to sync files, otherwise you cannot manipulate
A description of the application scenarioThere are several game suits running PHP code on the back end of LB, the same as PHP code for each server's environment deployment. It is now sometimes necessary to change the game profile, such as changing the service state of each area. Logging on to each server to change the corresponding files is cumbersome and requires the configuration files on the other server to change automatically when the configuration file on the first server is changed. So co
It is cumbersome to modify the code directly on the NetBSD-1.0 . And after the code is modified to synchronize to NetBSD-1.0 and can only use ftp , if you need to synchronize more files, there may be errors. So the idea of using rsync to synchronize the code is generated. There is no rsync program on NetBSD-1.0 , and there is no ssh, so you can only go the way of
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.