There are two ways to mainstream file synchronization under Linux, one is SCP (based on local, SSH), and the other is rsync (multiple ways local, SSH, RSYNCD)
SCP Execution Command format
SCP [OPTIONS] Source destination
Example (local to remote, vice versa remote to local)
scp/home/daisy/full.tar.gz [Email Protected]:/home/root
Copy directory plus parameter-r
-V parameter to provide detailed information about the SCP process
The-p parameter will help to put the expected time and connection speed on the screen.
-c parameter to make file transfer faster
-L Limit Bandwidth usage
-C Select another encryption algorithm to encrypt the file
-P Selected port
-Q parameter to silence them
-I specifies the authentication key for the transfer, eliminating the password
Rsync Execution Command format
rsync [OPTIONS] Source destination
Using SSH mode
-e ssh [email protected]:/dir format
RSYNC-VZRTOPG--delete--progress--password-file=/etc/rsyncd.secrets [email protected]::backup/home/receive
V: Information such as progress at the time of transmission
Z: Indicates compression
R: Is recursive
T: Keep the file in its original time
O: Keep the original owner of the document
P: Transfer Progress
G: Keep file original user group
--progress refers to the display
--delete means that if the server side deletes this file, then the client also deletes the file accordingly, keeping the true consistency
--password-file=/etc/rsyncd.secrets Authentication password for silent synchronization
Linux Sync Tool SCP, rsync