This article is a mirror article of machine translation, please click here to jump to the original article.

View: 510|Reply: 0

[linux] Linux uses rsync to synchronize data to the new server

[Copy link]
Posted on 2025-8-4 08:54:05 | | | |
Requirements: Website microservice architecture, applications need to be deployed to multi-teragen servers, and container technology (K8S) is not used. Run the program directly on multiple hosts, after deploying a server, how to quickly copy the program to the multi-ethermeter server, previously using the scp command, this article uses the more powerful rsync command.
Linux Secretless Login (ssh) or Secretless Copy (scp) files to other servers
https://www.itsvse.com/thread-10258-1-1.html

CentOS 7 copies files to another server via commands
https://www.itsvse.com/thread-10012-1-1.html

rsync is a widely used file synchronization tool in Linux systems that supports data replication and synchronization between local and remote file systems. rsync improves the efficiency of file synchronization by detecting changes in files and transferring only new or modified parts.

Official Website:The hyperlink login is visible.
Source:The hyperlink login is visible.

rsync and scp comparisons are as follows:



Folder syncing

Synchronize the /test/ folder of server A to the /test/ folder of server B with the following command:
Parameter introduction:

-a: Archive mode (reserved permissions, timestamps, etc.)
-v: Show details
-z: Compressed transmission

As shown below:





Previous:.NET/C# despaces the string non-empty string in the object (class instance).
Next:RazorLight tutorial for the .NET/C# template engine
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com