{"id":193,"date":"2021-07-28T04:52:46","date_gmt":"2021-07-28T04:52:46","guid":{"rendered":"https:\/\/www.cyberrafting.com\/blog\/?p=193"},"modified":"2021-07-28T04:52:47","modified_gmt":"2021-07-28T04:52:47","slug":"useful-rsync-command","status":"publish","type":"post","link":"https:\/\/www.cyberrafting.com\/blog\/linux\/useful-rsync-command\/","title":{"rendered":"Useful rsync Command Examples"},"content":{"rendered":"\n<p>Rsync (Remote Sync) is the most commonly used command for copying and synchronising files and directories remotely as well as locally in Linux\/Unix systems. With the help of the rsync command, you can copy and synchronise your data remotely and locally across directories, across disks and networks, perform data backups and mirroring between two Linux machines.<\/p>\n\n\n\n<p>This article explains some basic and advanced usage of the rsync command to transfer your files remotely and locally in Linux based machines. You don\u2019t need to be a root user to run the rsync command.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong><span style=\"text-decoration: underline;\">Some advantages and features of the Rsync command<\/span><\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>It efficiently copies and sync files to or from a remote system.<\/li><li>Supports copying links, devices, owners, groups and permissions.<\/li><li>It\u2019s faster than SCP (Secure Copy) because rsync uses a remote-update protocol which allows transferring just the differences between two sets of files. The first time, it copies the whole content of a file or a directory from source to destination, but from next time, it copies only the changed blocks and bytes to the destination.<\/li><li>Rsync consumes less bandwidth as it uses the compression and decompression method while sending and receiving data on both ends.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong><span style=\"text-decoration: underline;\">The basic syntax of rsync command<\/span><\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code># rsync options source destination<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong><span style=\"text-decoration: underline;\">Some common options used with rsync commands<\/span><\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>-v:<\/strong> verbose<\/li><li><strong>-r: <\/strong>copies data recursively (but don\u2019t preserve timestamps and permission while transferring data<\/li><li><strong>-a:<\/strong> archive mode, archive mode allows copying files recursively, and it also preserves symbolic links, file permissions, user &amp; group ownerships and timestamps<\/li><li><strong>-z:<\/strong> compress file data<\/li><li><strong>-h:<\/strong> human-readable, output numbers in a human-readable format<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong><span style=\"text-decoration: underline;\">Install rsync in your Linux machine<\/span><\/strong><\/h2>\n\n\n\n<p>You can install rsync package with the help of the following command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># yum install rsync (On Red Hat-based systems)\n# apt-get install rsync (On Debian based systems)<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong><span style=\"text-decoration: underline;\">1. Copy\/Sync Files and Directory Locally<\/span><\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong><span style=\"text-decoration: underline;\">Copy\/Sync a File on a Local Computer<\/span><\/strong><\/h3>\n\n\n\n<p>The following command will sync a single file on a local machine from one location to another location. Here in this example, a file name backup.tar needs to be copied or synced to \/tmp\/backups\/ folder.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@tecmint]# rsync -zvh backup.tar \/tmp\/backups\/\n\ncreated directory \/tmp\/backups\n\nbackup.tar\n\nsent 14.71M bytes  received 31 bytes  3.27M bytes\/sec\n\ntotal size is 16.18M  speedup is 1.10<\/code><\/pre>\n\n\n\n<p>In the above example, you can see that if the destination is not already existed, rsync will create a directory automatically for a destination.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong><span style=\"text-decoration: underline;\">Copy\/Sync a Directory on Local Computer<\/span><\/strong><\/h3>\n\n\n\n<p>The following command will transfer or sync all the files from one directory to a different directory in the same machine. Here in this example, \/root\/rpmpkgs contains some rpm package files, and you want that directory to be copied inside \/tmp\/backups\/ folder.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@tecmint]# rsync -avzh \/root\/rpmpkgs \/tmp\/backups\/\n\nsending incremental file list\n\nrpmpkgs\/\n\nrpmpkgs\/httpd-2.2.3-82.el5.centos.i386.rpm\n\nrpmpkgs\/mod_ssl-2.2.3-82.el5.centos.i386.rpm\n\nrpmpkgs\/nagios-3.5.0.tar.gz\n\nrpmpkgs\/nagios-plugins-1.4.16.tar.gz\n\nsent 4.99M bytes  received 92 bytes  3.33M bytes\/sec\n\ntotal size is 4.99M  speedup is 1.00<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong><span style=\"text-decoration: underline;\">2. Copy\/Sync Files and Directory to or From a Server<\/span><\/strong><\/h2>\n\n\n\n<p>Copy a Directory from Local Server to a Remote Server<\/p>\n\n\n\n<p>This command will sync a directory from a local machine to a remote machine. For example, there is a folder in your local computer, \u201crpmpkgs\u201d, that contains some RPM packages, and you want that local directory\u2019s content sends to a remote server, you can use the following command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@tecmint]$ rsync -avz rpmpkgs\/ root@192.168.0.101:\/home\/\n\nroot@192.168.0.101's password:\n\nsending incremental file list\n\n.\/\n\nhttpd-2.2.3-82.el5.centos.i386.rpm\n\nmod_ssl-2.2.3-82.el5.centos.i386.rpm\n\nnagios-3.5.0.tar.gz\n\nnagios-plugins-1.4.16.tar.gz\n\nsent 4993369 bytes  received 91 bytes  399476.80 bytes\/sec\n\ntotal size is 4991313  speedup is 1.00<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong><span style=\"text-decoration: underline;\">Copy\/Sync a Remote Directory to a Local Machine<\/span><\/strong><\/h3>\n\n\n\n<p>This command will help you sync a remote directory to a local directory. Here in this example, a directory \/home\/himani\/rpmpkgs, which is on a remote server, is being copied in your local computer in \/tmp\/myrpms.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@tecmint]# rsync -avzh root@192.168.0.100:\/home\/tarunika\/rpmpkgs \/tmp\/myrpms\n\nroot@192.168.0.100's password:\n\nreceiving incremental file list\n\ncreated directory \/tmp\/myrpms\n\nrpmpkgs\/\n\nrpmpkgs\/httpd-2.2.3-82.el5.centos.i386.rpm\n\nrpmpkgs\/mod_ssl-2.2.3-82.el5.centos.i386.rpm\n\nrpmpkgs\/nagios-3.5.0.tar.gz\n\nrpmpkgs\/nagios-plugins-1.4.16.tar.gz\n\nsent 91 bytes  received 4.99M bytes  322.16K bytes\/sec\n\ntotal size is 4.99M  speedup is 1.00<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong><span style=\"text-decoration: underline;\">3. Rsync Over SSH<\/span><\/strong><\/h2>\n\n\n\n<p>With rsync, we can use SSH (Secure Shell) for data transfer, using SSH protocol while transferring our data. You can be ensured that your data is being transferred in a secured connection with encryption so that nobody can read your data while it is being transferred over the wire on the internet.<\/p>\n\n\n\n<p>Also, when we use rsync, we need to provide the user\/root password to accomplish that particular task, so using the SSH option will send your logins in an encrypted manner so that your password will be safe.<\/p>\n\n\n\n<p>Copy a File from a Remote Server to a Local Server with SSH<\/p>\n\n\n\n<p>To specify a protocol with rsync, you need to give the \u201c-e\u201d option with the protocol name you want to use. Here in this example, We will be using \u201cssh\u201d with the \u201c-e\u201d option and perform data transfer.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@tecmint]# rsync -avzhe ssh root@192.168.0.100:\/root\/install.log \/tmp\/\n\nroot@192.168.0.100's password:\n\nreceiving incremental file list\n\ninstall.log\n\nsent 30 bytes  received 8.12K bytes  1.48K bytes\/sec\n\ntotal size is 30.74K  speedup is 3.77<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong><span style=\"text-decoration: underline;\">Copy a File from a Local Server to a Remote Server with SSH<\/span><\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@tecmint]# rsync -avzhe ssh backup.tar root@192.168.0.100:\/backups\/\n\nroot@192.168.0.100's password:\n\nsending incremental file list\n\nbackup.tar\n\nsent 14.71M bytes  received 31 bytes  1.28M bytes\/sec\n\ntotal size is 16.18M  speedup is 1.10<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong><span style=\"text-decoration: underline;\">4. Show Progress While Transferring Data with rsync<\/span><\/strong><\/h2>\n\n\n\n<p>To show the progress while transferring the data from one machine to a different machine, we can use the \u2018\u2013progress\u2019 option. It displays the files and the time remaining to complete the transfer.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@tecmint]# rsync -avzhe ssh --progress \/home\/rpmpkgs root@192.168.0.100:\/root\/rpmpkgs\n\nroot@192.168.0.100's password:\n\nsending incremental file list\n\ncreated directory \/root\/rpmpkgs\n\nrpmpkgs\/\n\nrpmpkgs\/httpd-2.2.3-82.el5.centos.i386.rpm\n\n           1.02M 100%        2.72MB\/s        0:00:00 (xfer#1, to-check=3\/5)\n\nrpmpkgs\/mod_ssl-2.2.3-82.el5.centos.i386.rpm\n\n          99.04K 100%  241.19kB\/s        0:00:00 (xfer#2, to-check=2\/5)\n\nrpmpkgs\/nagios-3.5.0.tar.gz\n\n           1.79M 100%        1.56MB\/s        0:00:01 (xfer#3, to-check=1\/5)\n\nrpmpkgs\/nagios-plugins-1.4.16.tar.gz\n\n           2.09M 100%        1.47MB\/s        0:00:01 (xfer#4, to-check=0\/5)\n\nsent 4.99M bytes  received 92 bytes  475.56K bytes\/sec\n\ntotal size is 4.99M  speedup is 1.00<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong><span style=\"text-decoration: underline;\">5. Use of \u2013include and \u2013exclude Options<\/span><\/strong><\/h2>\n\n\n\n<p>These two options allow us to include and exclude files by specifying parameters with these option helps us to specify those files or directories which you want to include in your sync and exclude files and folders with you don\u2019t want to be transferred.<\/p>\n\n\n\n<p>Here in this example, the sync command will include those files and directory only, which starts with \u2018R\u2019 and exclude all other files and directory.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@tecmint]# rsync -avze ssh --include 'R*' --exclude '*' root@192.168.0.101:\/var\/lib\/rpm\/ \/root\/rpm\n\nroot@192.168.0.101's password:\n\nreceiving incremental file list\n\ncreated directory \/root\/rpm\n\n.\/\n\nRequirename\n\nRequireversion\n\nsent 67 bytes  received 167289 bytes  7438.04 bytes\/sec\n\ntotal size is 434176  speedup is 2.59<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong><span style=\"text-decoration: underline;\">6. Use of \u2013delete Option<\/span><\/strong><\/h2>\n\n\n\n<p>If a file or directory does not exist at the source but already exists at the destination, you might want to delete that existing file\/directory at the target while syncing.<\/p>\n\n\n\n<p>We can use the \u2018\u2013delete\u2018 option to delete files that are not there in the source directory.<\/p>\n\n\n\n<p>Source and target are in sync. We are now creating a new file test.txt at the target.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@tecmint]# touch test.txt\n&#91;root@tecmint]# rsync -avz --delete root@192.168.0.100:\/var\/lib\/rpm\/ .\nPassword:\nreceiving file list ... done\ndeleting test.txt\n.\/\nsent 26 bytes  received 390 bytes  48.94 bytes\/sec\ntotal size is 45305958  speedup is 108908.55<\/code><\/pre>\n\n\n\n<p>Target has the new file called test.txt; when synchronising with the source with the \u2018\u2013delete\u2018 option, it removed the file test.txt.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong><span style=\"text-decoration: underline;\">7. Set the Max Size of Files to be Transferred<\/span><\/strong><\/h2>\n\n\n\n<p>You can specify the Max file size to be transferred or sync. You can do it with the \u201c\u2013max-size\u201d option. Here in this example, the Max file size is 200k, so this command will transfer only those files which are equal to or smaller than 200k.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@tecmint]# rsync -avzhe ssh --max-size='200k' \/var\/lib\/rpm\/ root@192.168.0.100:\/root\/tmprpm\n\nroot@192.168.0.100's password:\n\nsending incremental file list\n\ncreated directory \/root\/tmprpm\n\n.\/\n\nConflictname\n\nGroup\n\nInstalltid\n\nName\n\nProvideversion\n\nPubkeys\n\nRequireversion\n\nSha1header\n\nSigmd5\n\nTriggername\n\n__db.001\n\nsent 189.79K bytes  received 224 bytes  13.10K bytes\/sec\n\ntotal size is 38.08M  speedup is 200.43<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong><span style=\"text-decoration: underline;\">8. Automatically Delete source Files after successful Transfer<\/span><\/strong><\/h2>\n\n\n\n<p>Now, suppose you have the main web server and a data backup server, you created a daily backup and synced it with your backup server, now you don\u2019t want to keep that local copy of backup in your web server.<\/p>\n\n\n\n<p>So, will you wait for the transfer to complete and then delete that local backup file manually? Of Course, NO. This automatic deletion can be done using the \u2018\u2013remove-source-files\u2018 option.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@tecmint]# rsync --remove-source-files -zvh backup.tar \/tmp\/backups\/\n\nbackup.tar\n\nsent 14.71M bytes  received 31 bytes  4.20M bytes\/sec\n\ntotal size is 16.18M  speedup is 1.10\n\n&#91;root@tecmint]# ll backup.tar\n\nls: backup.tar: No such file or directory<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong><span style=\"text-decoration: underline;\">9. Do a Dry Run with rsync<\/span><\/strong><\/h2>\n\n\n\n<p>Suppose you are a newbie and using rsync and don\u2019t know what exactly your command is going to do. Rsync could really mess up the things in your destination folder, and then doing an undo can be a tedious job.<\/p>\n\n\n\n<p>Use of this option will not make any changes. Only do a dry run of the command and shows the output of the command; if the output shows exactly the same you want to do, then you can remove the \u2018\u2013dry-run\u2018 option from your command and run on the terminal.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>root@tecmint]# rsync --dry-run --remove-source-files -zvh backup.tar \/tmp\/backups\/\n\nbackup.tar\n\nsent 35 bytes  received 15 bytes  100.00 bytes\/sec\n\ntotal size is 16.18M  speedup is 323584.00 (DRY RUN)<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong><span style=\"text-decoration: underline;\">10. Set Bandwidth Limit and Transfer File<\/span><\/strong><\/h2>\n\n\n\n<p>You can set the bandwidth limit while transferring data from one machine to another machine with the help of the \u2018\u2013bwlimit\u2018 option. This option helps us to limit I\/O bandwidth.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@tecmint]# rsync --bwlimit=100 -avzhe ssh  \/var\/lib\/rpm\/  root@192.168.0.100:\/root\/tmprpm\/\nroot@192.168.0.100's password:\nsending incremental file list\nsent 324 bytes  received 12 bytes  61.09 bytes\/sec\ntotal size is 38.08M  speedup is 113347.05<\/code><\/pre>\n\n\n\n<p>Also, by default, rsync syncs changed blocks and bytes only. If you want explicitly want to sync the whole file, then you use the \u2018-W\u2018 option with it.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@tecmint]# rsync -zvhW backup.tar \/tmp\/backups\/backup.tar\nbackup.tar\nsent 14.71M bytes  received 31 bytes  3.27M bytes\/sec\ntotal size is 16.18M  speedup is 1.10<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Rsync (Remote Sync) is the most commonly used command for copying and synchronising files and directories remotely as well as locally in Linux\/Unix systems. With &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-193","post","type-post","status-publish","format-standard","hentry","category-linux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Useful rsync Command Examples<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.cyberrafting.com\/blog\/linux\/useful-rsync-command\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Useful rsync Command Examples\" \/>\n<meta property=\"og:description\" content=\"Rsync (Remote Sync) is the most commonly used command for copying and synchronising files and directories remotely as well as locally in Linux\/Unix systems. With &hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.cyberrafting.com\/blog\/linux\/useful-rsync-command\/\" \/>\n<meta property=\"og:site_name\" content=\"Cyber Rafting\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-28T04:52:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-07-28T04:52:47+00:00\" \/>\n<meta name=\"author\" content=\"cyberrafting\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"cyberrafting\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/linux\\\/useful-rsync-command\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/linux\\\/useful-rsync-command\\\/\"},\"author\":{\"name\":\"cyberrafting\",\"@id\":\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/#\\\/schema\\\/person\\\/0533280d6685c57435a3151c387fff99\"},\"headline\":\"Useful rsync Command Examples\",\"datePublished\":\"2021-07-28T04:52:46+00:00\",\"dateModified\":\"2021-07-28T04:52:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/linux\\\/useful-rsync-command\\\/\"},\"wordCount\":1188,\"commentCount\":0,\"articleSection\":[\"Linux\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/linux\\\/useful-rsync-command\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/linux\\\/useful-rsync-command\\\/\",\"url\":\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/linux\\\/useful-rsync-command\\\/\",\"name\":\"Useful rsync Command Examples\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/#website\"},\"datePublished\":\"2021-07-28T04:52:46+00:00\",\"dateModified\":\"2021-07-28T04:52:47+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/#\\\/schema\\\/person\\\/0533280d6685c57435a3151c387fff99\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/linux\\\/useful-rsync-command\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/linux\\\/useful-rsync-command\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/linux\\\/useful-rsync-command\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Useful rsync Command Examples\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/\",\"name\":\"Cyber Rafting Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/#\\\/schema\\\/person\\\/0533280d6685c57435a3151c387fff99\",\"name\":\"cyberrafting\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c1f1c30a5a84d51fe015a59038822cd67358fd7fa1e202f74b946af36798f286?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c1f1c30a5a84d51fe015a59038822cd67358fd7fa1e202f74b946af36798f286?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c1f1c30a5a84d51fe015a59038822cd67358fd7fa1e202f74b946af36798f286?s=96&d=mm&r=g\",\"caption\":\"cyberrafting\"},\"sameAs\":[\"https:\\\/\\\/www.cyberrafting.com\\\/blog\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Useful rsync Command Examples","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.cyberrafting.com\/blog\/linux\/useful-rsync-command\/","og_locale":"en_US","og_type":"article","og_title":"Useful rsync Command Examples","og_description":"Rsync (Remote Sync) is the most commonly used command for copying and synchronising files and directories remotely as well as locally in Linux\/Unix systems. With &hellip;","og_url":"https:\/\/www.cyberrafting.com\/blog\/linux\/useful-rsync-command\/","og_site_name":"Cyber Rafting","article_published_time":"2021-07-28T04:52:46+00:00","article_modified_time":"2021-07-28T04:52:47+00:00","author":"cyberrafting","twitter_card":"summary_large_image","twitter_misc":{"Written by":"cyberrafting","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.cyberrafting.com\/blog\/linux\/useful-rsync-command\/#article","isPartOf":{"@id":"https:\/\/www.cyberrafting.com\/blog\/linux\/useful-rsync-command\/"},"author":{"name":"cyberrafting","@id":"https:\/\/www.cyberrafting.com\/blog\/#\/schema\/person\/0533280d6685c57435a3151c387fff99"},"headline":"Useful rsync Command Examples","datePublished":"2021-07-28T04:52:46+00:00","dateModified":"2021-07-28T04:52:47+00:00","mainEntityOfPage":{"@id":"https:\/\/www.cyberrafting.com\/blog\/linux\/useful-rsync-command\/"},"wordCount":1188,"commentCount":0,"articleSection":["Linux"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.cyberrafting.com\/blog\/linux\/useful-rsync-command\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.cyberrafting.com\/blog\/linux\/useful-rsync-command\/","url":"https:\/\/www.cyberrafting.com\/blog\/linux\/useful-rsync-command\/","name":"Useful rsync Command Examples","isPartOf":{"@id":"https:\/\/www.cyberrafting.com\/blog\/#website"},"datePublished":"2021-07-28T04:52:46+00:00","dateModified":"2021-07-28T04:52:47+00:00","author":{"@id":"https:\/\/www.cyberrafting.com\/blog\/#\/schema\/person\/0533280d6685c57435a3151c387fff99"},"breadcrumb":{"@id":"https:\/\/www.cyberrafting.com\/blog\/linux\/useful-rsync-command\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.cyberrafting.com\/blog\/linux\/useful-rsync-command\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.cyberrafting.com\/blog\/linux\/useful-rsync-command\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.cyberrafting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Useful rsync Command Examples"}]},{"@type":"WebSite","@id":"https:\/\/www.cyberrafting.com\/blog\/#website","url":"https:\/\/www.cyberrafting.com\/blog\/","name":"Cyber Rafting Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.cyberrafting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.cyberrafting.com\/blog\/#\/schema\/person\/0533280d6685c57435a3151c387fff99","name":"cyberrafting","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c1f1c30a5a84d51fe015a59038822cd67358fd7fa1e202f74b946af36798f286?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c1f1c30a5a84d51fe015a59038822cd67358fd7fa1e202f74b946af36798f286?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c1f1c30a5a84d51fe015a59038822cd67358fd7fa1e202f74b946af36798f286?s=96&d=mm&r=g","caption":"cyberrafting"},"sameAs":["https:\/\/www.cyberrafting.com\/blog"]}]}},"_links":{"self":[{"href":"https:\/\/www.cyberrafting.com\/blog\/wp-json\/wp\/v2\/posts\/193","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cyberrafting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cyberrafting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cyberrafting.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cyberrafting.com\/blog\/wp-json\/wp\/v2\/comments?post=193"}],"version-history":[{"count":1,"href":"https:\/\/www.cyberrafting.com\/blog\/wp-json\/wp\/v2\/posts\/193\/revisions"}],"predecessor-version":[{"id":194,"href":"https:\/\/www.cyberrafting.com\/blog\/wp-json\/wp\/v2\/posts\/193\/revisions\/194"}],"wp:attachment":[{"href":"https:\/\/www.cyberrafting.com\/blog\/wp-json\/wp\/v2\/media?parent=193"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cyberrafting.com\/blog\/wp-json\/wp\/v2\/categories?post=193"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cyberrafting.com\/blog\/wp-json\/wp\/v2\/tags?post=193"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}