we learned more about the structure of disk and the management of disk in the previous section, we know Linux the management of the disk is through fdisk command Plus parameters to implement, and then format is MKFS.EXT4 command. Finally , You can use the Mount command to mount it to the appropriate directory. Today we are explaining a more commonly used tool -rsync. Remember is more commonly used! Let me make a brief introduction to him:
rsync is a backup tool that enables incremental and full-scale backups
rsync There are three modes of operation
The first type is local. CP
How to use:
CP Features: Rsync-avzfenfawenjian fenfawenjian2
The second type is the push-pull mode between local area networks.
How to use:
Push local files to the remote server
Rsync-avz./ceshi.sh-e ' ssh-p ' [email protected]:~
Pull the remote file to the local
Rsync-avz-e ' Ssh-p22 ' 192.168.1.14:~fenfawenjian2/tmp/
The third type is Daemon mode (daemon) is using the 873 Port.
How to use:
Rsync+crontab
Inotify+rsync
Let me give you a sample of these three models:
let's talk first. CP the function , we are Linux under Common CP command to copy files to another directory, but rsync This function can also be implemented. as follows
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/7C/B0/wKiom1bWSt3gz9_yAADFHUds5Ew474.png "title=" QQ picture 20160302100224.png "alt=" Wkiom1bwst3gz9_yaadfhuds5ew474.png "/>
rsync Push-pull mode in LAN.
I will explain the meaning of the push-pull, "push" is to say that our local files pushed to another server. Pull is to pull the file on the other server onto the local server.
Here we do not explain, why? You remember the SCP command we talked about earlier . Their functions are the same, The first two modes of rsync we just know, do not need to master. Next we will focus on his daemon mode (daemon), and say here I think I need to explain what is called the daemon and the interactive process. The so-called daemon is when our computer starts, it can run itself. The interactive process is when I need to start, start, do not need to start.
This article from "Lele Run" blog, please be sure to keep this source http://10851431.blog.51cto.com/10841431/1746583
The use of Rsync tools under Linux