Managed Dedicated Server
Run CPU-intensive workloads with ease
Reading time: 4 minutes
When we discuss transferring or synchronizing files between two locations, Rsync is one of the most prominent and widely used tools. It permits you to copy files locally as well as remotely, while saving time and bandwidth by transferring only the changes instead of the entire file.
On CentOS 6, Rsync is not often installed by default, but you can easily set it up using the package manager. Once installed, it becomes a solid command-line utility for backups, file transfers, and mirroring directories across servers.
In this guide, we are going to discuss the key steps to install Rsync on CentOS 6 so you can start utilizing it for your data synchronization and backup necessities.
This command will check for available updates and, if required, install them. The procedure may take some time to finish, depending on the available updates.
It will download and install the rsync package as well as any crucial dependencies. When asked to confirm the installation, type ‘y and click Enter
This command represents the version of rsync that is currently installed on your system. If you see the version number, rsync is successfully installed.
In this syntax, options are any additional options you want to pass to rsync, the source is the path to the source directory or file, and the destination is the path to the destination directory or file.
For instance, if you want to copy a file from your local machine to a remote server using rsync, you can use the following command: rsync /path/to/local/file user@remote:/path/to/destination.
In this command, '/path/to/local/file' is the path to the file you want to copy, ‘user’ is the username of the remote server, ‘remote’ is the IP address or hostname of the remote server, and ‘/path/to/destination’ is the path to the destination directory on the remote server.
You can also prefer rsync to synchronize two directories. For example, if you have a directory on your local machine that you want to synchronize with a directory on a remote server, you can use the command below: Rsync -avz /path/to/local/directory/user@remote:/path/to/destination
The "-avz" set of arguments in this command instructs rsync to compress the data during the transfer, preserve permissions, and archive the files. The path to the local directory you wish to synchronize is "/path/to/local/directory/," the username of the remote server is "user," the IP address or hostname of the remote server is "remote," and the path to the destination directory on the remote server is "/path/to/destination/."
As a result, Rsync is a reliable application that may help you manage your files more quickly and efficiently. To install rsync on CentOS 6, adhere to the previously mentioned instructions.