To install Rsync on a cloud server, follow these steps based on your server's operating system:
Update the package list and install Rsync:
sudo apt update
sudo apt install rsync -y
Install Rsync using yum or dnf:
sudo yum install rsync -y # For CentOS 7 or older
sudo dnf install rsync -y # For CentOS 8/RHEL 8+
Use dnf to install Rsync:
sudo dnf install rsync -y
Use zypper to install Rsync:
sudo zypper install rsync
After installation, check the Rsync version to confirm it's installed correctly:
rsync --version
After installing Rsync, you can use it to synchronize files between servers. For example:
rsync -avz /path/to/source/ user@remote-server:/path/to/destination/
If you're using Tencent Cloud CVM (Cloud Virtual Machine), ensure the security group allows Rsync traffic (default port 873 for Rsync daemon mode). For secure transfers, consider using Tencent Cloud VPN or SSH tunneling.
For automated backups, you can combine Rsync with Tencent Cloud Object Storage (COS) using tools like rclone or scripts.
If you need a managed solution, Tencent Cloud provides Tencent Cloud File Storage (CFS) for shared file systems, which can integrate with Rsync for efficient data replication.