Net2Secure: A Leading Data Center Service Provider in India

Leading Web Hosting Provider in India

+91 9953046498 sales@net2secure.com Support / Register

Category: Tech Guide /

How to Install Rsync on CentOS 6?


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.

Steps to Install Rsync on CentOS 6

  1. Connect to CentOS 6 Server: Connecting to your CentOS 6 server is the beginning step in installing rsync. Any SSH client, like as PuTTY or the built-in Terminal on Linux or macOS, can be used.
  2. Update your System: You must update your system packages before installing rsync. This step is crucial to verify that you have the current security patches and bug fixes. To finish the task, enter the command below: Sudo yum update

    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.

  3. Install Rsync: After the system has been updated, you can install rsync. Run the following command to finish this: sudo yum install rsync

    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

  4. Verify Rsync Installation: After the installation is finished, apply the following command to verify the same: rsync-version

    This command represents the version of rsync that is currently installed on your system. If you see the version number, rsync is successfully installed.

  5. Using Rsync: Now that rsync is installed, let’s look at how to use it. The basic syntax for using rsync is as follows: rsync [options] [source] [destination]

    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.


We use cookies

By continuing to browse this site, you are agreeing to the use of cookies to enhance your experience.