{"id":15520,"date":"2019-02-20T07:19:14","date_gmt":"2019-02-20T07:19:14","guid":{"rendered":"https:\/\/www.hostinger.com\/tutorials\/?p=15520"},"modified":"2026-03-10T09:30:52","modified_gmt":"2026-03-10T09:30:52","slug":"how-to-use-rsync","status":"publish","type":"post","link":"\/ca\/tutorials\/how-to-use-rsync\/","title":{"rendered":"How to use the Linux rsync command to streamline remote file synchronization"},"content":{"rendered":"<?xml encoding=\"utf-8\" ?><p>Copying files from one device to another can be a cumbersome task. Fortunately, you can simplify this process on Linux using the <strong>rsync <\/strong>command.<\/p><p><strong>rsync<\/strong>, short for remote sync, lets you transfer and synchronize files or folders between local devices and remote Linux-based servers. Whether you&rsquo;re a pro or just getting started, mastering the <strong>rsync <\/strong>command can streamline your Linux file management.<\/p><p>This article will delve deep into the <strong>rsync<\/strong> command and how it works. We&rsquo;ll also demonstrate how to use the <strong>rsync<\/strong> command through practical examples.<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/assets.hostinger.com\/content\/tutorials\/pdf\/Linux-Commands-Cheat-Sheet.pdf\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"2048\" height=\"566\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/Linux-cheat-sheet.png\/w=1024,h=1024,fit=scale-down\" alt=\"\" class=\"wp-image-69262\"  sizes=\"auto, (max-width: 2048px) 100vw, 2048px\" \/><\/a><\/figure>\n<\/div><p>\n\n\n<div class=\"protip\"><div class=\"protip__heading\">\n                <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                    <path d=\"M1.49234 23.5024C1.23229 23.5024 0.972242 23.4024 0.782206 23.2123C0.562165 22.9923 0.452144 22.6822 0.502153 22.3722C0.562165 21.9221 1.14227 17.9113 3.00262 16.351C3.63274 15.8209 4.43289 15.5509 5.26305 15.5609C6.09321 15.5909 6.87335 15.9109 7.47347 16.4911C8.6937 17.6913 8.76371 19.6717 7.6435 20.9919C6.0832 22.8523 2.08245 23.4324 1.63237 23.4924C1.59236 23.4924 1.54235 23.4924 1.50234 23.4924L1.49234 23.5024ZM5.16303 17.5613C4.84297 17.5613 4.53291 17.6713 4.29287 17.8813C3.60274 18.4614 3.07264 19.9317 2.75258 21.242C4.06282 20.9219 5.5331 20.3918 6.11321 19.7017C6.55329 19.1716 6.54329 18.3814 6.0832 17.9213C5.85316 17.7013 5.5431 17.5713 5.20304 17.5613C5.19304 17.5613 5.17303 17.5613 5.16303 17.5613ZM11.7243 21.8821C11.4942 21.8821 11.2642 21.8021 11.0841 21.652C10.8541 21.462 10.7241 21.1819 10.7241 20.8819V15.9109L8.08358 13.2705H3.11264C2.81259 13.2705 2.53254 13.1404 2.3425 12.9104C2.15246 12.6803 2.07245 12.3803 2.12246 12.0902C2.19247 11.7102 2.84259 8.36953 4.70294 7.12929C6.33325 6.04909 8.96375 6.49918 10.244 6.80923C11.5442 4.96889 13.2546 3.4286 15.2349 2.33839C17.4553 1.11816 19.9858 0.518051 22.4963 0.498047C23.0464 0.498047 23.4865 0.948132 23.4865 1.49824C23.4865 5.0389 22.3763 9.97983 17.1753 13.7605C17.4853 15.0408 17.9354 17.6613 16.8552 19.2816C15.615 21.1419 12.2744 21.7921 11.8943 21.8621C11.8343 21.8721 11.7743 21.8821 11.7143 21.8821H11.7243ZM12.7245 16.181V19.6016C13.7146 19.2916 14.7948 18.7915 15.2049 18.1814C15.675 17.4812 15.605 16.091 15.385 14.9008C14.5248 15.3808 13.6346 15.8109 12.7245 16.181ZM9.66388 12.0302L11.9643 14.3307C13.1845 13.8306 14.3648 13.2204 15.485 12.5103C19.9358 9.51974 21.2361 5.60901 21.4561 2.53843C19.6157 2.67846 17.8254 3.20856 16.2051 4.09872C14.2847 5.14892 12.6544 6.68921 11.4942 8.54956C10.7841 9.65977 10.174 10.82 9.66388 12.0302ZM4.39289 11.2701H7.81353C8.1936 10.3599 8.63368 9.46974 9.11377 8.60957C7.92355 8.38953 6.51329 8.31952 5.81315 8.78961C5.19304 9.19968 4.70294 10.3099 4.39289 11.2701Z\" fill=\"#673DE6\"\/>\n                <\/svg>\n                <p class=\"protip__title\">\n                   What Is rsync?\n                <\/p>\n            <\/div>\n            <p class=\"protip__content\"><br>\n<b>rsync<\/b> is a powerful and versatile <a href=\"\/ca\/tutorials\/linux-commands\/\">Linux command<\/a> for transferring and synchronizing files between local and remote devices. Unlike traditional copy commands, <b>rsync<\/b> uses a delta-transfer algorithm to only transmit the differences between the source and destination files. This approach drastically reduces bandwidth usage and speeds up transfers.<br>\n<\/p><\/div>\n\n\n\n<\/p><p><strong>rsync<\/strong> also has robust features for transferring files to a backup server and mirroring tasks. It preserves file attributes and supports secure transfers over SSH, making it suitable for both local and remote file transfers.<\/p><h2 class=\"wp-block-heading\" id=\"h-how-does-rsync-work\">How Does rsync Work?<\/h2><p>This section will explore various <strong>rsync<\/strong> options and basic syntax for different purposes.<\/p><h3 class=\"wp-block-heading\" id=\"h-rsync-options-and-parameters\">rsync Options and Parameters<\/h3><p><strong>rsync<\/strong> has numerous command line options, parameters, and configuration files to tailor its behavior. Here are some commonly used ones:<\/p><ul class=\"wp-block-list\">\n<li><strong>-v or &ndash;verbose <\/strong>&ndash; Increase verbosity, providing more detailed output during the transfer.<\/li>\n\n\n\n<li><strong>-a or &ndash;archive <\/strong>&ndash; Archive mode, which includes recursive copying and preserving file permissions, timestamps, <a href=\"\/ca\/tutorials\/how-to-create-symbolic-links-in-linux\/\">symbolic links<\/a>, and device files.<\/li>\n\n\n\n<li><strong>-r or &ndash;recursive <\/strong>&ndash; Recursively copy directories.<\/li>\n\n\n\n<li><strong>&ndash;delete <\/strong>&ndash; Delete excluded files from the destination directory.<\/li>\n\n\n\n<li><strong>&ndash;exclude=PATTERN <\/strong>&ndash; Exclude files or directories matching the specified pattern.<\/li>\n\n\n\n<li><strong>&ndash;include=PATTERN <\/strong>&ndash; Include files or directories matching the specified pattern.<\/li>\n\n\n\n<li><strong>-z or &ndash;compress <\/strong>&ndash; Compress file data during the transfer to reduce bandwidth usage.<\/li>\n\n\n\n<li><strong>-s or &ndash;sparse <\/strong>&ndash; Generate a summary of synchronized files and directories, including sparse files, after a sync operation.<\/li>\n\n\n\n<li><strong>&ndash;dry-run <\/strong>&ndash; Perform a trial run without making any actual changes.<\/li>\n\n\n\n<li><strong>&ndash;temp-dir <\/strong>&ndash; Specify a directory to store temporary files.<\/li>\n\n\n\n<li><strong>-u or &ndash;update <\/strong>&ndash; Skip files on the destination side that are newer than the source files so only older files are updated.<\/li>\n\n\n\n<li><strong>-h or &ndash;human-readable <\/strong>&ndash; Output numbers in a human-readable format.<\/li>\n\n\n\n<li><strong>-i or &ndash;itemize-changes <\/strong>&ndash; Output a list of changes made during the transfer.<\/li>\n\n\n\n<li><strong>&ndash;progress <\/strong>&ndash; Show progress during the transfer.<\/li>\n\n\n\n<li><strong>&ndash;stats <\/strong>&ndash; Provides file transfer stats after it is complete.<\/li>\n\n\n\n<li><strong>-e or &ndash;rsh=COMMAND <\/strong>&ndash; Specify which remote shell to use.<\/li>\n\n\n\n<li><strong>&ndash;bwlimit=RATE <\/strong>&ndash; Limit the bandwidth to increase network efficiency.<\/li>\n\n\n\n<li><strong>-P or &ndash;partial &ndash;progress <\/strong>&ndash; Keep partially transferred files and show progress.<\/li>\n<\/ul><p>For a comprehensive list of all available <strong>rsync <\/strong>options, run the following command:<\/p><pre class=\"wp-block-preformatted\">man rsync<\/pre><p>You will see detailed information about each option and parameter.<\/p><h3 class=\"wp-block-heading\" id=\"h-basic-syntax\">Basic Syntax<\/h3><p>The basic syntax of an <strong>rsync <\/strong>command is as follows:<\/p><pre class=\"wp-block-preformatted\">rsync [OPTIONS] SOURCE DESTINATION<\/pre><ul class=\"wp-block-list\">\n<li><strong>[OPTIONS] <\/strong>&ndash; This is the section where you can include <strong>rsync<\/strong> options. You can add more than one option.<\/li>\n\n\n\n<li><strong>SOURCE <\/strong>&ndash; This is the source directory or file you want to copy or synchronize. Specify the path to the source data here.<\/li>\n\n\n\n<li><strong>DESTINATION <\/strong>&ndash; The destination directory where the source data will be copied or synchronized. Specify the path to the destination directory or file here.<\/li>\n<\/ul><h3 class=\"wp-block-heading\" id=\"h-basic-syntax-for-remote-shell\">Basic Syntax for Remote Shell<\/h3><p>When using <strong>rsync <\/strong>to transfer data from a local computer to a Linux <a href=\"\/ca\/tutorials\/what-is-vps-hosting\/\">virtual private server<\/a> (VPS), communication relies on the <strong>rsync <\/strong>daemon. The <strong>rsync<\/strong> syntax for the remote shell is as follows:<\/p><pre class=\"wp-block-preformatted\">rsync [OPTIONS] -e \"SSH_COMMAND\" SOURCE DESTINATION<\/pre><p>The <strong>-e<\/strong> option is used to specify the remote shell. In most cases, you&rsquo;ll use <strong>ssh<\/strong> to connect to the remote host using the <strong>rsync<\/strong> remote update protocol.<\/p><p>Let&rsquo;s explore two common scenarios.<\/p><p>Use the following command to pull data from a remote system to your local machine:<\/p><pre class=\"wp-block-preformatted\">rsync -avz -e ssh user@remote_host:\/path\/to\/source\/ \/path\/to\/local\/destination\/<\/pre><p>Use the following command to push data from your local file system to a remote directory using the <strong>CVS<\/strong> protocol:<\/p><pre class=\"wp-block-preformatted\">rsync -avz \/path\/to\/local\/source\/ user@remote_host:\/path\/to\/remote\/destination\/<\/pre><h2 class=\"wp-block-heading\" id=\"h-how-to-check-the-rsync-version\">How to Check the rsync Version<\/h2><p><strong>rsync<\/strong> is typically included by default in many <a href=\"\/ca\/tutorials\/best-linux-distro\/\">Linux distributions<\/a>. Let&rsquo;s check whether <strong>rsync <\/strong>is already installed on your system.<\/p><p>For Windows users working with <a href=\"\/ca\/vps-hosting\">VPS Hosting<\/a>, <a href=\"\/ca\/tutorials\/how-to-use-putty-ssh\/\">use PuTTY SSH<\/a> to log in. If you&rsquo;re using macOS or Linux, access Terminal.<\/p><p>Once logged in, execute the command below:<\/p><pre class=\"wp-block-preformatted\">rsync --version<\/pre><p>You&rsquo;ll receive an output similar to the following:<\/p><pre class=\"wp-block-preformatted\">rsync version 3.2.7 protocol version 31<\/pre><figure class=\"wp-block-image size-large\"><a class=\"hgr-tutorials-cta hgr-tutorials-cta-vps-hosting\" href=\"\/ca\/vps-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=1024,h=1024,fit=scale-down\" alt=\"\" class=\"wp-image-77934\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><h2 class=\"wp-block-heading\" id=\"h-how-to-install-rsync\">How to Install rsync<\/h2><p>If <strong>rsync <\/strong>isn&rsquo;t pre-installed on your local or remote machine, go ahead and install it manually. Here are the installation commands for different operating systems:<\/p><p>For Debian-based distributions, including Ubuntu:<\/p><pre class=\"wp-block-preformatted\">sudo apt-get install rsync<\/pre><p>For Fedora-based distributions, such as CentOS:<\/p><pre class=\"wp-block-preformatted\">sudo dnf install rsync<\/pre><p>For macOS:<\/p><pre class=\"wp-block-preformatted\">brew install rsync<\/pre><h2 class=\"wp-block-heading\" id=\"h-how-to-use-rsync-commands\">How to Use rsync Commands<\/h2><p>Before learning to use <strong>rsync<\/strong>, let&rsquo;s prepare two test directories named <strong>original<\/strong> and <strong>duplicate<\/strong>. The <strong>original<\/strong> directory will contain three sample files, while the <strong>duplicate<\/strong> directory will start out empty.<\/p><p>To create these directories, follow these commands:<\/p><pre class=\"wp-block-preformatted\">cd\nmkdir original\nmkdir duplicate<\/pre><p>Next, create three sample files inside the <strong>original <\/strong>folder using the <a href=\"\/ca\/tutorials\/linux-touch-command\/\">touch command<\/a>:<\/p><pre class=\"wp-block-preformatted\">touch original\/file{1..3}<\/pre><p>To make sure all the sample files are created, list all the files in the <strong>original <\/strong>directory and observe the file system using this command:<\/p><pre class=\"wp-block-preformatted\">rsync original\/<\/pre><h3 class=\"wp-block-heading\" id=\"h-most-common-rsync-commands\">Most Common rsync Commands<\/h3><p>One of the most essential use cases for <strong>rsync <\/strong>is to replicate data between two directories within the same system. To do this, use the following command:<\/p><pre class=\"wp-block-preformatted\">rsync original\/* duplicate\/<\/pre><p>The contents inside the <strong>original <\/strong>directory will be mirrored in the <strong>duplicate<\/strong> directory. If you add a new file or update existing files in the<strong> original <\/strong>directory, only the new or changed files will be transferred. However, if the <strong>duplicate <\/strong>folder doesn&rsquo;t exist, it will result in an error.<\/p><p>To synchronize files and create a new folder simultaneously, use this command instead:<\/p><pre class=\"wp-block-preformatted\">rsync original\/ duplicate\/<\/pre><h3 class=\"wp-block-heading\" id=\"h-how-to-use-rsync-commands-with-subdirectories\">How to Use rsync Commands With Subdirectories<\/h3><p>To synchronize folders and subdirectories between two locations, use this <strong>rsync<\/strong> copy directory command:<\/p><pre class=\"wp-block-preformatted\">rsync -r original\/*\/ duplicate\/<\/pre><p>To synchronize a specific subdirectory, type the command below:<\/p><pre class=\"wp-block-preformatted\">rsync -r original\/subdirectory_name\/ duplicate\/<\/pre><p>Replace <strong>subdirectory_name<\/strong> with the name of the subfolder you want to synchronize.<\/p><p>You may want to exclude a particular subdirectory from synchronization. In this case, enter the following command to do it:<\/p><pre class=\"wp-block-preformatted\">rsync -r --exclude=subdirectory_name original\/ duplicate\/<\/pre><h3 class=\"wp-block-heading\" id=\"h-how-to-synchronize-files\">How to Synchronize Files<\/h3><p>To sync or update files between two folders, use this command:<\/p><pre class=\"wp-block-preformatted\">rsync -av original\/ duplicate\/<\/pre><p>To copy the files from the <strong>original <\/strong>directory to a remote server, enter this command:<\/p><pre class=\"wp-block-preformatted\">rsync -av -e ssh original\/ username@remote_host:\/path\/to\/destination\/<\/pre><p>Replace <strong>username, remote_host, <\/strong>and <strong>\/path\/to\/destination\/ <\/strong>with the appropriate values.<\/p><h3 class=\"wp-block-heading\" id=\"h-how-to-combine-rsync-commands\">How to Combine rsync Commands<\/h3><p>As you become more familiar with <strong>rsync<\/strong>, let&rsquo;s explore its capability to combine multiple commands for complex file management tasks.<\/p><p>You can combine synchronization and exclusion features to achieve precise results.<\/p><p>The example below shows how you can synchronize all files from the <strong>original<\/strong> <strong>rsync<\/strong> directory while excluding <strong>TXT<\/strong> files:<\/p><pre class=\"wp-block-preformatted\">rsync -av --exclude='*.txt' original\/ duplicate\/<\/pre><p>Combine the <strong>-r <\/strong>option with synchronization commands to ensure that <strong>rsync<\/strong> directories and their contents are recursively synchronized.<\/p><pre class=\"wp-block-preformatted\">rsync -av -r original\/ duplicate\/<\/pre><p>Before synchronizing an actual <strong>rsync<\/strong> folder, you can use the <strong>&ndash;dry-run<\/strong> option to preview the changes <strong>rsync<\/strong> would make without making any actual modifications.<\/p><pre class=\"wp-block-preformatted\">rsync -av --dry-run original\/ duplicate\/<\/pre><h3 class=\"wp-block-heading\" id=\"h-other-options-for-rsync-commands\">Other Options for rsync Commands<\/h3><p>The <strong>&ndash;delete<\/strong> option allows you to delete files from the destination directory that no longer exist in the source directory. To use this option, include it in your <strong>rsync<\/strong> command like this:<\/p><pre class=\"wp-block-preformatted\">rsync -av --delete original\/ duplicate\/<\/pre><p><strong>rsync<\/strong> supports synchronizing specified files or file types using patterns and wildcards. For example, to only synchronize <strong>TXT<\/strong> files, enter:<\/p><pre class=\"wp-block-preformatted\">rsync -av original\/*.txt duplicate\/<\/pre><p>You can also exclude files based on specific patterns in their names. To exclude a file named <strong>example.txt<\/strong>, type the following command:<\/p><pre class=\"wp-block-preformatted\">rsync -av --exclude=example.txt original\/ duplicate\/<\/pre><p>Combine the <strong>&ndash;include<\/strong> and <strong>&ndash;exclude<\/strong> options to include multiple files or directories while excluding others. Here&rsquo;s an example to include files beginning with the letter <strong>L<\/strong> and exclude all the other files:<\/p><pre class=\"wp-block-preformatted\">rsync -av --include='L*' --exclude='*' original\/ duplicate\/<\/pre><p>To limit synchronization to files below a specific size, use the <strong>&ndash;max-size<\/strong> option followed by the size limit. The <strong>rsync<\/strong> command to only synchronize files smaller than <strong>10 MB<\/strong> is as follows:<\/p><pre class=\"wp-block-preformatted\">rsync -av --max-size=10M original\/ duplicate\/<\/pre><h3 class=\"wp-block-heading\" id=\"h-how-to-add-a-progress-bar\">How to Add a Progress Bar<\/h3><p>Monitoring synchronization progress can be helpful, especially for large file transfers. <strong>rsync<\/strong> allows you to include a progress bar using the <strong>&ndash;progress<\/strong> option. Here&rsquo;s the command you can employ:<\/p><pre class=\"wp-block-preformatted\">rsync -av --progress original\/ duplicate\/<\/pre><p>The output will look something like this:<\/p><pre class=\"wp-block-preformatted\">file1.txt\n    5,120,000 100%   50.00MB\/s 0:00:00 (xfr#1, to-chk=2\/3)\nfile2.txt\n    5,345,678 100%   55.67MB\/s 0:00:00 (xfr#2, to-chk=1\/3)<\/pre><p>To add a progress bar and keep partially transferred files instead of deleting them upon interruption, use the <strong>-P<\/strong> option:<\/p><pre class=\"wp-block-preformatted\">rsync -av -P original\/ duplicate\/<\/pre><h3 class=\"wp-block-heading\" id=\"h-how-to-create-an-rsync-backup\">How to Create an rsync Backup<\/h3><p>Lastly, <strong>rsync<\/strong> provides a convenient way to create backup files using the <strong>&ndash;backup<\/strong> option. This option lets you back up files to a server, preventing overwriting during synchronization.<\/p><p>To create a remote backup and specify its directory, use the following command:<\/p><pre class=\"wp-block-preformatted\">rsync -av --backup --backup-dir=\/path\/to\/backup\/ original\/ duplicate\/<\/pre><p>When executed, the <strong>rsync<\/strong> backup option generates an incremental file list and appends a tilde (<strong>~<\/strong>) to the original file name, such as <strong>important.txt.<\/strong><\/p><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p><strong>rsync<\/strong> is a powerful remote synchronization, data transfer, and file mirroring tool. In this guide, we&rsquo;ve covered everything you need to get started with the tool, from installation to practical <strong>rsync <\/strong>examples you can apply via the command line. Mastering <strong>rsync<\/strong> will enhance your Linux file management, making it more efficient and reliable.<\/p><p>        <div class=\"protip\">\n            <div class=\"protip__heading\">\n                <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                    <path d=\"M1.49234 23.5024C1.23229 23.5024 0.972242 23.4024 0.782206 23.2123C0.562165 22.9923 0.452144 22.6822 0.502153 22.3722C0.562165 21.9221 1.14227 17.9113 3.00262 16.351C3.63274 15.8209 4.43289 15.5509 5.26305 15.5609C6.09321 15.5909 6.87335 15.9109 7.47347 16.4911C8.6937 17.6913 8.76371 19.6717 7.6435 20.9919C6.0832 22.8523 2.08245 23.4324 1.63237 23.4924C1.59236 23.4924 1.54235 23.4924 1.50234 23.4924L1.49234 23.5024ZM5.16303 17.5613C4.84297 17.5613 4.53291 17.6713 4.29287 17.8813C3.60274 18.4614 3.07264 19.9317 2.75258 21.242C4.06282 20.9219 5.5331 20.3918 6.11321 19.7017C6.55329 19.1716 6.54329 18.3814 6.0832 17.9213C5.85316 17.7013 5.5431 17.5713 5.20304 17.5613C5.19304 17.5613 5.17303 17.5613 5.16303 17.5613ZM11.7243 21.8821C11.4942 21.8821 11.2642 21.8021 11.0841 21.652C10.8541 21.462 10.7241 21.1819 10.7241 20.8819V15.9109L8.08358 13.2705H3.11264C2.81259 13.2705 2.53254 13.1404 2.3425 12.9104C2.15246 12.6803 2.07245 12.3803 2.12246 12.0902C2.19247 11.7102 2.84259 8.36953 4.70294 7.12929C6.33325 6.04909 8.96375 6.49918 10.244 6.80923C11.5442 4.96889 13.2546 3.4286 15.2349 2.33839C17.4553 1.11816 19.9858 0.518051 22.4963 0.498047C23.0464 0.498047 23.4865 0.948132 23.4865 1.49824C23.4865 5.0389 22.3763 9.97983 17.1753 13.7605C17.4853 15.0408 17.9354 17.6613 16.8552 19.2816C15.615 21.1419 12.2744 21.7921 11.8943 21.8621C11.8343 21.8721 11.7743 21.8821 11.7143 21.8821H11.7243ZM12.7245 16.181V19.6016C13.7146 19.2916 14.7948 18.7915 15.2049 18.1814C15.675 17.4812 15.605 16.091 15.385 14.9008C14.5248 15.3808 13.6346 15.8109 12.7245 16.181ZM9.66388 12.0302L11.9643 14.3307C13.1845 13.8306 14.3648 13.2204 15.485 12.5103C19.9358 9.51974 21.2361 5.60901 21.4561 2.53843C19.6157 2.67846 17.8254 3.20856 16.2051 4.09872C14.2847 5.14892 12.6544 6.68921 11.4942 8.54956C10.7841 9.65977 10.174 10.82 9.66388 12.0302ZM4.39289 11.2701H7.81353C8.1936 10.3599 8.63368 9.46974 9.11377 8.60957C7.92355 8.38953 6.51329 8.31952 5.81315 8.78961C5.19304 9.19968 4.70294 10.3099 4.39289 11.2701Z\" fill=\"#673DE6\"\/>\n                <\/svg>\n                <p class=\"protip__title\">\n                    Discover Other Linux Commands for Server Management                <\/p>\n            <\/div>\n            <p class=\"protip__content\"><a href=\"\/ca\/tutorials\/vps\/how-to-check-and-manage-disk-space-via-terminal\/\">How to Check Disk Space on Linux<\/a><br>\n<a href=\"\/ca\/tutorials\/curl-command-with-examples-linux\/\">How to Transfer Data With Curl Command<\/a><br>\n<a href=\"\/ca\/tutorials\/linux-time-command\/\">How to Calculate Process Execution With Time Command<\/a><br>\n<a href=\"\/ca\/tutorials\/using-scp-command-to-transfer-files\/\">How to Transfer Files Using Scp Command<\/a><br>\n<a href=\"\/ca\/tutorials\/linux-watch-command\/\">How to Monitor Changes With Watch Command<\/a><br>\n<a href=\"\/ca\/tutorials\/linux-shutdown-command\/\">How to Shutdown and Restart the Server<\/a><br>\n<a href=\"\/ca\/tutorials\/manage-and-list-services-in-linux\/\"> How to List Services in Linux<\/a><br>\n<a href=\"\/ca\/tutorials\/linux-tee-command-with-examples\/\">How to Write and Display to File With Tee Command<\/a><\/p>\n                    <\/div>\n        \n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-rsync-faq\">rsync FAQ<\/h2><p>This section will answer the most common questions about <strong>rsync.<\/strong><\/p><div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1696401823699\"><h3 class=\"schema-faq-question\">What Operating Systems Are Compatible With rsync?<\/h3> <p class=\"schema-faq-answer\"><strong>rsync<\/strong> is primarily designed for Unix-like operating systems, including Linux and macOS. However, it can also be used on Windows systems with the help of third-party <strong>rsync<\/strong> client applications like Cygwin or Windows Subsystem for Linux (WSL). This makes <strong>rsync<\/strong> a versatile choice for file synchronization across various operating systems.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1696401854618\"><h3 class=\"schema-faq-question\">How Does rsync Differ From Other File Transfer Methods?<\/h3> <p class=\"schema-faq-answer\">Instead of transferring entire file systems, <strong>rsync<\/strong> only sends the differences between destination and source files, reducing bandwidth usage. It can work over secure SSH connections, offer flexible file compression, and resume interrupted transfers. It&rsquo;s particularly handy when dealing with a large number of files in a remote system.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1696401866087\"><h3 class=\"schema-faq-question\">Are There Any Limitations or Drawbacks to Using rsync?<\/h3> <p class=\"schema-faq-answer\">While <strong>rsync<\/strong> is a powerful tool, it has some limitations. First, it may not be suitable for real-time synchronization as it operates in batch mode. Additionally, it doesn&rsquo;t provide native encryption, as users often rely on SSH for secure transfers. Lastly, <strong>rsync<\/strong> can be complex for beginners, requiring a learning curve to master its extensive options.<\/p> <\/div> <\/div>\n","protected":false},"excerpt":{"rendered":"<p>Copying files from one device to another can be a cumbersome task. Fortunately, you can simplify this process on Linux using the rsync command. rsync, short for remote sync, lets you transfer and synchronize files or folders between local devices and remote Linux-based servers. Whether you&rsquo;re a pro or just getting started, mastering the rsync [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/ca\/tutorials\/how-to-use-rsync\/\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":411,"featured_media":139877,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"How to Use the Rsync Command in Linux for File Transfer","rank_math_description":"The Linux rsync command transfers and synchronizes files between 2 locations. Read this article to learn how to use the rsync command.","rank_math_focus_keyword":"rsync","footnotes":""},"categories":[22703,22699],"tags":[],"class_list":["post-15520","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-managing-monitoring-and-security","category-vps"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/how-to-use-rsync","default":0},{"locale":"pt-BR","link":"https:\/\/www.hostinger.com\/br\/tutoriais\/comando-rsync-linux","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/tutoriels\/commande-rsync-linux","default":0},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/tutoriales\/rsync-linux","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/tutorial\/rsync-linux","default":0},{"locale":"it-IT","link":"https:\/\/www.hostinger.com\/it\/tutorial\/rsync","default":0},{"locale":"en-GB","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/how-to-use-rsync","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/how-to-use-rsync","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/how-to-use-rsync","default":0},{"locale":"es-MX","link":"https:\/\/www.hostinger.com\/mx\/tutoriales\/rsync-linux","default":0},{"locale":"es-CO","link":"https:\/\/www.hostinger.com\/co\/tutoriales\/rsync-linux","default":0},{"locale":"es-AR","link":"https:\/\/www.hostinger.com\/ar\/tutoriales\/rsync-linux","default":0},{"locale":"pt-PT","link":"https:\/\/www.hostinger.com\/pt\/tutoriais\/comando-rsync-linux","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/how-to-use-rsync","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/how-to-use-rsync","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/how-to-use-rsync","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/how-to-use-rsync","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/posts\/15520","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/users\/411"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/comments?post=15520"}],"version-history":[{"count":30,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/posts\/15520\/revisions"}],"predecessor-version":[{"id":139876,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/posts\/15520\/revisions\/139876"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/media\/139877"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/media?parent=15520"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/categories?post=15520"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/tags?post=15520"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}