{"id":10425,"date":"2021-06-21T04:37:05","date_gmt":"2021-06-21T01:37:05","guid":{"rendered":"https:\/\/unihost.com\/help\/?p=10425"},"modified":"2023-09-20T17:09:51","modified_gmt":"2023-09-20T14:09:51","slug":"how-to-use-rsync-to-sync-local-and-remote-files-and-directories","status":"publish","type":"post","link":"https:\/\/unihost.com\/help\/how-to-use-rsync-to-sync-local-and-remote-files-and-directories\/","title":{"rendered":"How to use Rsync to sync local and remote files and directories"},"content":{"rendered":"<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10426 size-full\" src=\"https:\/\/unihost.com\/help\/minio.php?.\/using-rsync-linux.jpg\" alt=\"How to use Rsync to sync local and remote files and directories\" width=\"640\" height=\"335\" \/ title=\"How to use Rsync to sync local and remote files and directories - Image 1\"><\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Rsync is open-source software that can be used to sync files and folders from a local computer to a remote one and vice versa. <!--more-->A notable feature of Rsync is the ability to transfer encrypted files using <a href=\"https:\/\/unihost.com\/en\/ssl-installation\/\">SSH and SSL<\/a>. In addition, the file transfer is performed in a single thread, unlike other similar programs, which creates a separate thread for each file transfer. This increases the speed and removes the additional delays that become a problem when transferring a large number of small files.<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Rsync is a very flexible network-enabled sync tool. Due to its ubiquity on Linux and Unix-like systems and its popularity as a system scripting tool, it is included by default with most Linux distributions.<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">For Microsoft Windows, cwRsync is a free distribution of the Rsync utility optimized for quick and easy installation on Microsoft Windows. You can download cwRsync <a href=\"https:\/\/www.rsync.net\/resources\/binaries\/cwRsync_5.4.1_x86_Free.zip\" rel=\"nofollow nofollow noopener noreferrer\" target=\"_blank\">here<\/a>, however, we recommend checking for the latest version <a href=\"https:\/\/www.itefix.net\/cwrsync\" rel=\"nofollow nofollow noopener noreferrer\" target=\"_blank\">here<\/a>. Once you&#8217;ve downloaded this setup file, run it. You should choose the defaults that the installer gives you, including the default install path: C:\\Program Files\\cwRsync <\/span><br \/>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">STRONGLY recommend installing the program to the default folder.<\/span><\/p>\n<h4><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Features of Rsync:<\/span><\/h4>\n<ul>\n<li><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Ability to maintain synchronization of entire directory trees;<\/span><\/li>\n<li><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">You can save symbolic links, hard links, file owners and permissions, metadata, and creation time;<\/span><\/li>\n<li><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Doesn&#8217;t require any special privileges;<\/span><\/li>\n<li><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">File transfer in one stream;<\/span><\/li>\n<li><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Support for RSH, SSH as transport;<\/span><\/li>\n<li><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Anonymous Rsync support.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">By default, Rsync uses SSH transport. If you want to use the Rsync transport, you need to do some minimal configuration of the Rsync server. This will allow you to not only sync files to a remote server but also receive them from it.<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">First, create a config file with the following content:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">vi \/etc\/rsyncd.conf<\/span><\/pre>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">pid file = \/var\/run\/rsyncd.pid<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">lock file = \/var\/run\/rsync.lock<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">log file = \/var\/log\/rsync.log<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">[share]<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">path = \/tmp\/share\/<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">hosts allow = 123.123.133.133<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">hosts deny = *<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">list = true<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">uid = root<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">gid = root<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">read only = false<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Here we set the path to our folder for synchronization, allow access to the server only from the IP address (123.123.133.133) and deny all other connections. The <em>uid<\/em> and <em>gid<\/em> parameters specify the user and group from which the daemon will be started. It is better not to use root, but to specify the user nobody and give him the rights to the folder in which the Rsync directories will be synchronized.<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">The Rsync server configuration is completed, it remains to save the file, start the Rsync server and add it to startup:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">systemctl start rsync<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">systemctl enable rsync<\/span><\/pre>\n<h5><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Rsync syntax<\/span><\/h5>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">The basic Rsync syntax is very simple and works similarly to ssh, scp, and cp.<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><span style=\"color: #ff0000;\">rsync<\/span> <span style=\"color: #ff6600;\">options<\/span> <span style=\"color: #3366ff;\">source <\/span><span style=\"color: #339966;\">destination<\/span><\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">The source and destination can be a remote or local directory. For example ssh, rsync, samba server, or local directory. Options specify additional options for Rsync.<\/span><\/p>\n<h5><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Rsync options<\/span><\/h5>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Now let&#8217;s take a quick look at the Rsync options. Not all options are listed here. For more details see man <a href=\"https:\/\/linux.die.net\/man\/1\/rsync\" rel=\"nofollow nofollow noopener noreferrer\" target=\"_blank\">Rsync<\/a>:<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">-v &#8211; Display detailed information about the copying process;<\/span><br \/>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">-q &#8211; Minimum information;<\/span><br \/>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">-c &#8211; Checking checksums for files;<\/span><br \/>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">-a &#8211; Archiving mode, when all the attributes of the original files are preserved;<\/span><br \/>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">-R &#8211; Relative paths;<\/span><br \/>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">-b &#8211; Create a backup copy;<\/span><br \/>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">-u &#8211; Do not overwrite newer files;<\/span><br \/>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">-l &#8211; Copy symbolic links;<\/span><br \/>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">-h &#8211; Display numbers in human-readable format;<\/span><br \/>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">-L &#8211; Copy the contents of links;<\/span><br \/>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">-H &#8211; Copy hard links;<\/span><br \/>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">-W &#8211; Copy entire files;<\/span><br \/>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">-p &#8211; Preserve file permissions;<\/span><br \/>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">-g &#8211; Save the group;<\/span><br \/>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">-t &#8211; Keep modification time;<\/span><br \/>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">-x &#8211; Work only in this file system;<\/span><br \/>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">-e &#8211; Use another transport, for example, ssh;<\/span><br \/>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">-z &#8211; Compress files before transfer;<\/span><br \/>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">&#8211;delete &#8211; Delete files that are not in the source;<\/span><br \/>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">&#8211;exclude &#8211; Exclude files by pattern;<\/span><br \/>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">&#8211;include &#8211; Include files by pattern;<\/span><br \/>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">&#8211;recursive &#8211; Loop over directories recursively;<\/span><br \/>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">&#8211;no-recursive &#8211; Disable recursion;<\/span><br \/>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">&#8211;progress &#8211; Show the progress of the file transfer;<\/span><br \/>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">&#8211;stat &#8211; Show transmission statistics;<\/span><br \/>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">&#8211;version &#8211; The version of the utility.<\/span><\/p>\n<h5><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Copy and sync files locally<\/span><\/h5>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Rsync allows you to sync files and folders on the same computer. Let&#8217;s first take a look at using Rsync to sync a file locally:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">rsync -zvh anyfile \/mnt\/backup_dir\/<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">By specifying the &#8211;progress parameter, you can see how many percent have already been copied and how much is still left:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">rsync -zvh --progress anyfile \/mnt\/backup_dir\/<\/span><\/pre>\n<h5><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Synchronizing folders on the local computer<\/span><\/h5>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Synchronizing folders by Rsync is as easy as syncing files:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">rsync -zvh \/home\/user\/documents \/mnt\/backup_dir\/<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">If you want all file attributes such as modification and creation date to be preserved, you must use the -a option:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">rsync -azvh \/home\/user\/documents \/mnt\/backup_dir\/<\/span><\/pre>\n<h5><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Synchronization with a remote server<\/span><\/h5>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">It is not much more difficult to synchronize files with a remote server. Let&#8217;s copy the local documents folder to the remote server:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">rsync -avz \/home\/user\/documents\/ root@123.123.133.133:\/home\/<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">By default, Rsync will try to use SSH transport. If you want to use the previously created Rsync server, you need to specify it explicitly:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">rsync -avz \/home\/user\/documents\/ rsync:\/\/123.123.133.133:\/home\/<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Similarly, you can synchronize files with Rsync from a remote server:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">rsync -avz root@123.123.133.133:\/home\/ \/home\/user\/documents\/<\/span><\/pre>\n<h5><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Synchronizing files over ssh<\/span><\/h5>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">The <em>-e<\/em> option is used to set the connection protocol. When using SSH, all transmitted data is encrypted and transmitted over a secure channel, so that no one can intercept it. To use SSH, you need to know the user&#8217;s password on the system.<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Synchronizing files from a remote server via ssh will look like this:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">rsync -avzhe ssh root@123.123.133.133:\/home\/ \/home\/user\/documents\/<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">If you are using a different port for ssh, then you can specify it by this method:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">rsync -avzhe \"ssh -p 22\" root@123.123.133.133:\/home\/ \/home\/user\/documents\/<\/span><\/pre>\n<h5><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Synchronizing some files in Rsync<\/span><\/h5>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">The <em>&#8211;include<\/em> and <em>&#8211;exclude<\/em> options let you specify which files to sync and which to exclude. Options work not only with files but also with directories.<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">For example, let&#8217;s copy all files starting with the letter S:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">rsync -avze ssh --include 'S*' --exclude '*' \/home\/user\/documents\/ root@123.123.133.133:\/home\/<\/span><\/pre>\n<h5><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Delete on sync<\/span><\/h5>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">During synchronization, you can delete files that are not on the machine where Rsync synchronization is coming from, for this, use the <em>&#8211;delete<\/em> option.<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">For example:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">rsync -avz --delete root@123.123.133.133:\/home\/ \/home\/user\/documents\/<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">If, before executing this command, you create a file in the folder that is not on the remote server, then it will be deleted.<\/span><\/p>\n<h5><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Removing original files<\/span><\/h5>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">It is possible to delete the source files after the synchronization with the remote server is complete:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">rsync --remove-source-files -zvh root@123.123.133.133:\/home\/anyfile.tar \/home\/user\/documents\/<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Thus, anyfile.tar file will be deleted after copying to <em>\/home\/user\/documents\/<\/em> folder is complete.<\/span><\/p>\n<h5><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Rsync simulation mode<\/span><\/h5>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">If you are a beginner and haven\u2019t used Rsync yet, you might want to see how the command works without actually doing anything in the filesystem. There is a <em>&#8211;dry-run<\/em> option for this. The command will only output all performed actions to the terminal, without making any real changes:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">rsync --dry-run --remove-source-files -zvh root@123.123.133.133:\/home\/anyfile.tar \/home\/user\/documents\/<\/span><\/pre>\n<h5><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Limiting the transmission rate<\/span><\/h5>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">You can limit your network bandwidth usage with the <em>&#8211;bwlimit<\/em> option:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">rsync --bwlimit=100 -avzhe ssh root@123.123.133.133:\/home\/ \/home\/user\/documents\/<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Rsync only syncs parts of a file, if you want to sync the whole file use the <em>-W<\/em> option:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">rsync -zvhW root@123.123.133.133:\/home\/anyfile.tar \/home\/user\/documents\/anyfile.tar<\/span><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Rsync is open-source software that can be used to sync files and folders from a local computer to a remote one and vice versa.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[158],"tags":[700],"class_list":["post-10425","post","type-post","status-publish","format-standard","hentry","category-dedicated-servers","tag-rsync"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to use Rsync - Unihost.FAQ<\/title>\n<meta name=\"description\" content=\"Rsync is open-source software that can be used to sync files and folders from a local computer to a remote one and vice versa. - Unihost.FAQ\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/unihost.com\/help\/how-to-use-rsync-to-sync-local-and-remote-files-and-directories\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to use Rsync - Unihost.FAQ\" \/>\n<meta property=\"og:description\" content=\"Rsync is open-source software that can be used to sync files and folders from a local computer to a remote one and vice versa. - Unihost.FAQ\" \/>\n<meta property=\"og:url\" content=\"https:\/\/unihost.com\/help\/how-to-use-rsync-to-sync-local-and-remote-files-and-directories\/\" \/>\n<meta property=\"og:site_name\" content=\"Unihost.FAQ\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/unihost\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-06-21T01:37:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-20T14:09:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/unihost.com\/help\/wp-content\/uploads\/using-rsync-linux.jpg\" \/>\n<meta name=\"author\" content=\"Unihost Support\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@unihost\" \/>\n<meta name=\"twitter:site\" content=\"@unihost\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Unihost Support\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/unihost.com\/help\/how-to-use-rsync-to-sync-local-and-remote-files-and-directories\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/unihost.com\/help\/how-to-use-rsync-to-sync-local-and-remote-files-and-directories\/\"},\"author\":{\"name\":\"Unihost Support\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a\"},\"headline\":\"How to use Rsync to sync local and remote files and directories\",\"datePublished\":\"2021-06-21T01:37:05+00:00\",\"dateModified\":\"2023-09-20T14:09:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/unihost.com\/help\/how-to-use-rsync-to-sync-local-and-remote-files-and-directories\/\"},\"wordCount\":1086,\"publisher\":{\"@id\":\"https:\/\/unihost.com\/help\/#organization\"},\"image\":{\"@id\":\"https:\/\/unihost.com\/help\/how-to-use-rsync-to-sync-local-and-remote-files-and-directories\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/unihost.com\/help\/wp-content\/uploads\/using-rsync-linux.jpg\",\"keywords\":[\"rsync\"],\"articleSection\":[\"02. Dedicated servers\"],\"inLanguage\":\"en\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/unihost.com\/help\/how-to-use-rsync-to-sync-local-and-remote-files-and-directories\/\",\"url\":\"https:\/\/unihost.com\/help\/how-to-use-rsync-to-sync-local-and-remote-files-and-directories\/\",\"name\":\"How to use Rsync - Unihost.FAQ\",\"isPartOf\":{\"@id\":\"https:\/\/unihost.com\/help\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/unihost.com\/help\/how-to-use-rsync-to-sync-local-and-remote-files-and-directories\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/unihost.com\/help\/how-to-use-rsync-to-sync-local-and-remote-files-and-directories\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/unihost.com\/help\/wp-content\/uploads\/using-rsync-linux.jpg\",\"datePublished\":\"2021-06-21T01:37:05+00:00\",\"dateModified\":\"2023-09-20T14:09:51+00:00\",\"description\":\"Rsync is open-source software that can be used to sync files and folders from a local computer to a remote one and vice versa. - Unihost.FAQ\",\"breadcrumb\":{\"@id\":\"https:\/\/unihost.com\/help\/how-to-use-rsync-to-sync-local-and-remote-files-and-directories\/#breadcrumb\"},\"inLanguage\":\"en\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/unihost.com\/help\/how-to-use-rsync-to-sync-local-and-remote-files-and-directories\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\/\/unihost.com\/help\/how-to-use-rsync-to-sync-local-and-remote-files-and-directories\/#primaryimage\",\"url\":\"https:\/\/unihost.com\/help\/minio.php?.\/using-rsync-linux.jpg\",\"contentUrl\":\"https:\/\/unihost.com\/help\/minio.php?.\/using-rsync-linux.jpg\",\"width\":640,\"height\":335},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/unihost.com\/help\/how-to-use-rsync-to-sync-local-and-remote-files-and-directories\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Unihost\",\"item\":\"https:\/\/unihost.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Help\",\"item\":\"https:\/\/unihost.com\/help\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to use Rsync to sync local and remote files and directories\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/unihost.com\/help\/#website\",\"url\":\"https:\/\/unihost.com\/help\/\",\"name\":\"Unihost.FAQ\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/unihost.com\/help\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/unihost.com\/help\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/unihost.com\/help\/#organization\",\"name\":\"Unihost\",\"alternateName\":\"Unihost\",\"url\":\"https:\/\/unihost.com\/help\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png\",\"contentUrl\":\"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png\",\"width\":300,\"height\":300,\"caption\":\"Unihost\"},\"image\":{\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/unihost\/\",\"https:\/\/x.com\/unihost\",\"https:\/\/www.instagram.com\/unihost\/?hl=en\",\"https:\/\/www.linkedin.com\/company\/unihost-com\",\"https:\/\/www.youtube.com\/channel\/UCITKsxMDnslQY8brN3advgw\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a\",\"name\":\"Unihost Support\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g\",\"caption\":\"Unihost Support\"},\"sameAs\":[\"https:\/\/unihost.com\/\"],\"url\":\"https:\/\/unihost.com\/help\/author\/support\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to use Rsync - Unihost.FAQ","description":"Rsync is open-source software that can be used to sync files and folders from a local computer to a remote one and vice versa. - Unihost.FAQ","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:\/\/unihost.com\/help\/how-to-use-rsync-to-sync-local-and-remote-files-and-directories\/","og_locale":"en_US","og_type":"article","og_title":"How to use Rsync - Unihost.FAQ","og_description":"Rsync is open-source software that can be used to sync files and folders from a local computer to a remote one and vice versa. - Unihost.FAQ","og_url":"https:\/\/unihost.com\/help\/how-to-use-rsync-to-sync-local-and-remote-files-and-directories\/","og_site_name":"Unihost.FAQ","article_publisher":"https:\/\/www.facebook.com\/unihost\/","article_published_time":"2021-06-21T01:37:05+00:00","article_modified_time":"2023-09-20T14:09:51+00:00","og_image":[{"url":"https:\/\/unihost.com\/help\/wp-content\/uploads\/using-rsync-linux.jpg","type":"","width":"","height":""}],"author":"Unihost Support","twitter_card":"summary_large_image","twitter_creator":"@unihost","twitter_site":"@unihost","twitter_misc":{"Written by":"Unihost Support","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/unihost.com\/help\/how-to-use-rsync-to-sync-local-and-remote-files-and-directories\/#article","isPartOf":{"@id":"https:\/\/unihost.com\/help\/how-to-use-rsync-to-sync-local-and-remote-files-and-directories\/"},"author":{"name":"Unihost Support","@id":"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a"},"headline":"How to use Rsync to sync local and remote files and directories","datePublished":"2021-06-21T01:37:05+00:00","dateModified":"2023-09-20T14:09:51+00:00","mainEntityOfPage":{"@id":"https:\/\/unihost.com\/help\/how-to-use-rsync-to-sync-local-and-remote-files-and-directories\/"},"wordCount":1086,"publisher":{"@id":"https:\/\/unihost.com\/help\/#organization"},"image":{"@id":"https:\/\/unihost.com\/help\/how-to-use-rsync-to-sync-local-and-remote-files-and-directories\/#primaryimage"},"thumbnailUrl":"https:\/\/unihost.com\/help\/wp-content\/uploads\/using-rsync-linux.jpg","keywords":["rsync"],"articleSection":["02. Dedicated servers"],"inLanguage":"en"},{"@type":"WebPage","@id":"https:\/\/unihost.com\/help\/how-to-use-rsync-to-sync-local-and-remote-files-and-directories\/","url":"https:\/\/unihost.com\/help\/how-to-use-rsync-to-sync-local-and-remote-files-and-directories\/","name":"How to use Rsync - Unihost.FAQ","isPartOf":{"@id":"https:\/\/unihost.com\/help\/#website"},"primaryImageOfPage":{"@id":"https:\/\/unihost.com\/help\/how-to-use-rsync-to-sync-local-and-remote-files-and-directories\/#primaryimage"},"image":{"@id":"https:\/\/unihost.com\/help\/how-to-use-rsync-to-sync-local-and-remote-files-and-directories\/#primaryimage"},"thumbnailUrl":"https:\/\/unihost.com\/help\/wp-content\/uploads\/using-rsync-linux.jpg","datePublished":"2021-06-21T01:37:05+00:00","dateModified":"2023-09-20T14:09:51+00:00","description":"Rsync is open-source software that can be used to sync files and folders from a local computer to a remote one and vice versa. - Unihost.FAQ","breadcrumb":{"@id":"https:\/\/unihost.com\/help\/how-to-use-rsync-to-sync-local-and-remote-files-and-directories\/#breadcrumb"},"inLanguage":"en","potentialAction":[{"@type":"ReadAction","target":["https:\/\/unihost.com\/help\/how-to-use-rsync-to-sync-local-and-remote-files-and-directories\/"]}]},{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/unihost.com\/help\/how-to-use-rsync-to-sync-local-and-remote-files-and-directories\/#primaryimage","url":"https:\/\/unihost.com\/help\/minio.php?.\/using-rsync-linux.jpg","contentUrl":"https:\/\/unihost.com\/help\/minio.php?.\/using-rsync-linux.jpg","width":640,"height":335},{"@type":"BreadcrumbList","@id":"https:\/\/unihost.com\/help\/how-to-use-rsync-to-sync-local-and-remote-files-and-directories\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Unihost","item":"https:\/\/unihost.com\/"},{"@type":"ListItem","position":2,"name":"Help","item":"https:\/\/unihost.com\/help\/"},{"@type":"ListItem","position":3,"name":"How to use Rsync to sync local and remote files and directories"}]},{"@type":"WebSite","@id":"https:\/\/unihost.com\/help\/#website","url":"https:\/\/unihost.com\/help\/","name":"Unihost.FAQ","description":"","publisher":{"@id":"https:\/\/unihost.com\/help\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/unihost.com\/help\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en"},{"@type":"Organization","@id":"https:\/\/unihost.com\/help\/#organization","name":"Unihost","alternateName":"Unihost","url":"https:\/\/unihost.com\/help\/","logo":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/","url":"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png","contentUrl":"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png","width":300,"height":300,"caption":"Unihost"},"image":{"@id":"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/unihost\/","https:\/\/x.com\/unihost","https:\/\/www.instagram.com\/unihost\/?hl=en","https:\/\/www.linkedin.com\/company\/unihost-com","https:\/\/www.youtube.com\/channel\/UCITKsxMDnslQY8brN3advgw"]},{"@type":"Person","@id":"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a","name":"Unihost Support","image":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/unihost.com\/help\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g","caption":"Unihost Support"},"sameAs":["https:\/\/unihost.com\/"],"url":"https:\/\/unihost.com\/help\/author\/support\/"}]}},"_links":{"self":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts\/10425","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/comments?post=10425"}],"version-history":[{"count":17,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts\/10425\/revisions"}],"predecessor-version":[{"id":16270,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts\/10425\/revisions\/16270"}],"wp:attachment":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/media?parent=10425"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/categories?post=10425"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/tags?post=10425"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}