{"id":7700,"date":"2021-05-27T11:17:36","date_gmt":"2021-05-27T09:17:36","guid":{"rendered":"https:\/\/michlstechblog.info\/blog\/?p=7700"},"modified":"2021-05-27T11:19:10","modified_gmt":"2021-05-27T09:19:10","slug":"rsync-using-rsync-with-puttyagent-on-windows","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/rsync-using-rsync-with-puttyagent-on-windows\/","title":{"rendered":"rsync: Using rsync with puttyagent on Windows"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_7700 social_share_privacy clearfix 1.6.4 locale-en_US sprite-en_US\"><\/div><div class=\"twoclick-js\"><script type=\"text\/javascript\">\/* <![CDATA[ *\/\njQuery(document).ready(function($){if($('.twoclick_social_bookmarks_post_7700')){$('.twoclick_social_bookmarks_post_7700').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"rsync%3A%20Using%20rsync%20with%20puttyagent%20on%20Windows\",\"the_excerpt\":\"Hi%2C%0D%0A%0D%0Athe%20often%20called%20question%3A%20Can%20I%20run%20rsync%20on%20Windows%20by%20using%20the%20putty%20agent%3F%0D%0A%0D%0AAnswer%3A%20Yes%2C%20but%20there%20a%20some%20steps%20to%20setup%20such%20an%20environment.%20%0D%0A%20%28more%26hellip%3B%29\",\"txt_info\":\"2 clicks for more data protection:\\r\\n\\r\\nOnly when you click here, the button will be come active and you can send your recommendation to Flattr. When activating, data are transmitted to third parties. \",\"perma_option\":\"off\"}},\"txt_help\":\"When you activate these fields by clicking, information to Flattr may be transferred abroad, and probably may also stored there.\",\"settings_perma\":\"Enable permanently and accept data transmission. \",\"info_link\":\"http:\\\/\\\/www.heise.de\\\/ct\\\/artikel\\\/2-Klicks-fuer-mehr-Datenschutz-1333879.html\",\"uri\":\"https:\\\/\\\/michlstechblog.info\\\/blog\\\/rsync-using-rsync-with-puttyagent-on-windows\\\/\",\"post_id\":7700,\"post_title_referrer_track\":\"rsync%3A+Using+rsync+with+puttyagent+on+Windows\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p>Hi,<\/p>\n<p>the often called question: Can I run rsync on Windows by using the putty agent?<\/p>\n<p>Answer: Yes, but there a some steps to setup such an environment.<br \/>\n<!--more--><br \/>\nI&#8217;m assuming you aleady have putty installed at your computer. In this example the putty tools like plink etc. are downloaded to D:\\tools\\putty.<\/p>\n<p>First of all install cygwin&#8217;s rsync:<\/p>\n<ul>\n<li><a href=\"http:\/\/www.cygwin.com\/setup-x86_64.exe\" rel=\"noopener\" target=\"_blank\">Download <\/a>install cygwin it from the Internet<\/li>\n<li>Choose a (root) Install directory, i.e. D:\\tools\\cygwin<\/li>\n<li>Choose the directory where the files should downloaded to<\/li>\n<li>From the packages list choose<br \/>\nNet \/ rsync (latest version, here 3.2.3)<br \/>\nDevel \/ gcc-core (latest stable version, here 10.2.0)<\/li>\n<li>Add an Icon to the startmenu to be able to start the cygwin terminal<\/li>\n<\/ul>\n<p>when the installation finishs rsync could be found at<\/p>\n<pre><code>\r\nD:\\tools\\cygwin\\bin\\rsync.exe\r\n<\/code><\/pre>\n<p>Then you need cygnative because there is an incompatibility of stdin\/stdout redirection between cygwin and native Win32 programs. I will place it in the putty directory (curl is already included in newer Windows 10 releases)<br \/>\nDownload cygnativ source<\/p>\n<pre><code>\r\nD:\\> cd D:\\tools\\putty\r\nD:\\tools\\putty> curl https:\/\/raw.githubusercontent.com\/davidecolombo\/cygnative\/master\/cygnative.c -o cygnative.c\r\n<\/code><\/pre>\n<p>If you want to call cygwin commands (gcc, rsync) from a cmd shell you must add the cygwin bin folder and the putty folder to the path variable otherwise you have to specify the full path (in cygwin notation) to cygnative and plink for the rsync -e (&#8211;rsh) parameter.<\/p>\n<pre><code>\r\nD:\\tools\\putty> set PATH=%PATH%;D:\\tools\\cygwin\\bin;D:\\tools\\putty;\r\n<\/code><\/pre>\n<p>Compile cygnative<\/p>\n<pre><code>\r\nD:\\tools\\putty> D:\\tools\\cygwin\\bin\\gcc.exe cygnative.c -o cygnative.exe\r\nD:\\tools\\putty> cygnative.exe\r\ncygnative - a programm to use stdin\/stdout redirection\r\non native win32 programms called from cygwin\r\n(C) Copyright 2009, Frank Behrens, Version 1.2\r\nUsage: cygnative <prog> [args...]\r\n<\/code><\/pre>\n<p>Now you can call rsync. The local directory must be given in cygwin notation. For <strong>D:\\Temp<\/strong> you have to use <strong>\/cygdrive\/d\/Temp\/<\/strong>. Use the cygwin terminal to determine the correct path.<\/p>\n<pre><code>\r\nD:\\tools\\putty> rsync -args -e=\"cygnative plink\" \/cygdrive\/d\/Temp\/ michael@10.10.254.100:\/tmp\r\n<\/pre>\n<p><\/code><\/p>\n<p>Michael<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, the often called question: Can I run rsync on Windows by using the putty agent? Answer: Yes, but there a some steps to setup such an environment.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[1277,1590,20],"class_list":["post-7700","post","type-post","status-publish","format-standard","hentry","category-windowsknowhow","tag-rsync","tag-use-puttyagent","tag-windows-2"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/7700","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/comments?post=7700"}],"version-history":[{"count":17,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/7700\/revisions"}],"predecessor-version":[{"id":7717,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/7700\/revisions\/7717"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=7700"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=7700"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=7700"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}