{"id":660,"date":"2020-12-28T12:21:21","date_gmt":"2020-12-28T12:21:21","guid":{"rendered":"https:\/\/www.velaninfo.com\/rs\/?post_type=techtips&#038;p=660"},"modified":"2020-12-28T12:22:22","modified_gmt":"2020-12-28T12:22:22","slug":"how-to-transfer-files-folders-with-rsync-over-ssh","status":"publish","type":"techtips","link":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-transfer-files-folders-with-rsync-over-ssh\/","title":{"rendered":"How to Transfer Files and Folders with Rsync over SSH?"},"content":{"rendered":"<p>Rsync can be used to transfer files and directories over SSH between systems on the network. The most popular protocols are SSH and FTP. FTP is a popular protocol and SSH is the most secure way to transfer files.<\/p>\n<p>SCP and SFTP are some of the tools that are available to transfer files over SSH, but none of them has all the features that rsync provides. Rsync can be used to mirror, incremental backups, copying files between systems<\/p>\n<p>The following steps show how to transfer files and folders with rsync over SSH protocol.<\/p>\n<p><strong>Install rsync utility<\/strong><\/p>\n<p><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 CentOS and Fedora-based OS<\/strong><\/p>\n<p><em>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # yum install rsync <\/em><\/p>\n<p><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ubuntu and Debian based OS<\/strong><\/p>\n<p><em>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 $ Sudo apt install rsync<\/em><\/p>\n<p>We need to ensure we have <a href=\"https:\/\/www.dolphin24x7.com\/server-management\"><strong>SSH access for the remote server<\/strong><\/a>. The remote SSH user must have appropriate access rights to read and write files and folders.<\/p>\n<p><strong>Transfer a single file<\/strong><\/p>\n<p><em>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # rsync \u2013a \/opt\/&lt;single file&gt; &lt;username&gt;@&lt;IP Address&gt;\/&lt;path where you need to copy the file&gt;<\/em><\/p>\n<p>For Eg:<\/p>\n<p><em>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # rsync =a \/opt\/file.zip tom@192.168.1.8:\/var\/www<\/em><\/p>\n<p>The \u2013an option in the command stands for archive mode and allows you to sync directories recursively, transfer special and block devices, preserve symbolic links, modification time, group, ownership and permission.<\/p>\n<p><strong>Transfer files from remote to local<\/strong><\/p>\n<p><em># rsync -a tom@192.168.1.8:\/var\/www\/file.zip \/opt\/<\/em><\/p>\n<p>If SSH on your remote server is listening to a port other than the default port 22, we need to specify the custom port with the rsync command<\/p>\n<p><em># rsync -a -e &#8220;ssh -p 3322&#8221; \/home\/tom\/images\/ <\/em><a href=\"mailto:tom@1192.168.1.8:\/var\/www\/images\/\"><em>tom@1192.168.1.8:\/var\/www\/images\/<\/em><\/a><\/p>\n<p>Transferring a large amount of data requires you to monitor the progress. The rsync command in screen mode or with a \u2013P option will show you the progress of the transferred files.<\/p>\n<p>At Velan, our <a href=\"https:\/\/www.velaninfo.com\/mservices\/managed-it-services\"><strong>server support<\/strong><\/a> engineers can help you to copy a large amount of data from one server to another using rsync command. We troubleshoot problems like these for our clients every day. If you are interested in our service, please fill the <a href=\"https:\/\/www.velaninfo.com\/contact\"><strong>Quick connect form<\/strong><\/a> to get in touch with us<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Rsync can be used to transfer files and directories over SSH between systems on the network. The most popular protocols are SSH and FTP. FTP is a popular protocol and SSH is the most secure way to transfer files. SCP and SFTP are some of the tools that are available to transfer files over SSH,&#8230;<a class=\"continue-reading text-uppercase\" href=\"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-transfer-files-folders-with-rsync-over-ssh\/\"> Continue Reading <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.velaninfo.com\/rs\/wp-content\/themes\/velaninfo\/images\/reading_arw.png\" alt=\"Continue Reading\" width=\"16\" height=\"12\"\/><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"tags":[],"class_list":["post-660","techtips","type-techtips","status-publish","hentry","Categories_tech_tip-linux","Categories_tech_tip-server"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v19.5 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Transfer Files and Folders with Rsync over SSH?<\/title>\n<meta name=\"description\" content=\"Transfer Files and Folders with Rsync over SSH : Steps to transfer files and folders with rsync over SSH | Velan offers Remote Server Support Services\" \/>\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.velaninfo.com\/rs\/techtips\/how-to-transfer-files-folders-with-rsync-over-ssh\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Transfer Files and Folders with Rsync over SSH?\" \/>\n<meta property=\"og:description\" content=\"Transfer Files and Folders with Rsync over SSH : Steps to transfer files and folders with rsync over SSH | Velan offers Remote Server Support Services\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-transfer-files-folders-with-rsync-over-ssh\/\" \/>\n<meta property=\"og:site_name\" content=\"Velan\" \/>\n<meta property=\"article:modified_time\" content=\"2020-12-28T12:22:22+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/how-to-transfer-files-folders-with-rsync-over-ssh\\\/\",\"url\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/how-to-transfer-files-folders-with-rsync-over-ssh\\\/\",\"name\":\"How to Transfer Files and Folders with Rsync over SSH?\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/#website\"},\"datePublished\":\"2020-12-28T12:21:21+00:00\",\"dateModified\":\"2020-12-28T12:22:22+00:00\",\"description\":\"Transfer Files and Folders with Rsync over SSH : Steps to transfer files and folders with rsync over SSH | Velan offers Remote Server Support Services\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/how-to-transfer-files-folders-with-rsync-over-ssh\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/how-to-transfer-files-folders-with-rsync-over-ssh\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/how-to-transfer-files-folders-with-rsync-over-ssh\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tech Tips\",\"item\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Transfer Files and Folders with Rsync over SSH?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/#website\",\"url\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/\",\"name\":\"Velan\",\"description\":\"Velaninfo Services India Pvt Ltd\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Transfer Files and Folders with Rsync over SSH?","description":"Transfer Files and Folders with Rsync over SSH : Steps to transfer files and folders with rsync over SSH | Velan offers Remote Server Support Services","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.velaninfo.com\/rs\/techtips\/how-to-transfer-files-folders-with-rsync-over-ssh\/","og_locale":"en_US","og_type":"article","og_title":"How to Transfer Files and Folders with Rsync over SSH?","og_description":"Transfer Files and Folders with Rsync over SSH : Steps to transfer files and folders with rsync over SSH | Velan offers Remote Server Support Services","og_url":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-transfer-files-folders-with-rsync-over-ssh\/","og_site_name":"Velan","article_modified_time":"2020-12-28T12:22:22+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-transfer-files-folders-with-rsync-over-ssh\/","url":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-transfer-files-folders-with-rsync-over-ssh\/","name":"How to Transfer Files and Folders with Rsync over SSH?","isPartOf":{"@id":"https:\/\/www.velaninfo.com\/rs\/#website"},"datePublished":"2020-12-28T12:21:21+00:00","dateModified":"2020-12-28T12:22:22+00:00","description":"Transfer Files and Folders with Rsync over SSH : Steps to transfer files and folders with rsync over SSH | Velan offers Remote Server Support Services","breadcrumb":{"@id":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-transfer-files-folders-with-rsync-over-ssh\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-transfer-files-folders-with-rsync-over-ssh\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-transfer-files-folders-with-rsync-over-ssh\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.velaninfo.com\/rs\/"},{"@type":"ListItem","position":2,"name":"Tech Tips","item":"https:\/\/www.velaninfo.com\/rs\/techtips\/"},{"@type":"ListItem","position":3,"name":"How to Transfer Files and Folders with Rsync over SSH?"}]},{"@type":"WebSite","@id":"https:\/\/www.velaninfo.com\/rs\/#website","url":"https:\/\/www.velaninfo.com\/rs\/","name":"Velan","description":"Velaninfo Services India Pvt Ltd","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.velaninfo.com\/rs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/techtips\/660","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/techtips"}],"about":[{"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/types\/techtips"}],"author":[{"embeddable":true,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/comments?post=660"}],"version-history":[{"count":2,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/techtips\/660\/revisions"}],"predecessor-version":[{"id":662,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/techtips\/660\/revisions\/662"}],"wp:attachment":[{"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/media?parent=660"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/tags?post=660"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}