{"id":286,"date":"2003-02-25T13:12:48","date_gmt":"2003-02-25T17:12:48","guid":{"rendered":"http:\/\/wordpress.cephas.net\/?p=286"},"modified":"2003-02-25T13:12:48","modified_gmt":"2003-02-25T17:12:48","slug":"rsync-installation-and-implementation","status":"publish","type":"post","link":"https:\/\/cephas.net\/blog\/2003\/02\/25\/rsync-installation-and-implementation\/","title":{"rendered":"rsync: installation and implementation"},"content":{"rendered":"<p>I wrote up these directions (based on directions @ <a href=\"http:\/\/www.hksilver.net\/rsync\/\">http:\/\/www.hksilver.net\/rsync\/<\/a> on a couple weeks ago when I was doing some work with rsync. Someday I&#8217;m sure I&#8217;ll need them again&#8230; and maybe someone else will benefit. So here goes nothing:<\/p>\n<p>Download <a href=\"http:\/\/users.tseinc.com\/~numbski\/rsync.zip\">this<\/a> zip file (which contains cygwin1.dll,instsrv.exe,rsync.exe and srvany.exe) (I mirrored it <a href=\"http:\/\/cephas.net\/images\/files\/rsync.zip\">here<\/a>)<\/p>\n<p>Decompress the contents to c:\\rsync.<\/p>\n<p>Copy out cygwin1.dll to c:\\(system folder)\\system32, where system folder is either winnt or windows depending upon your OS.<\/p>\n<p>Open a command prompt and type:<\/p>\n<p>cd c:\\rsync<br \/>\ninstsrv Rsync &#8220;c:\\rsync\\srvany.exe&#8221;<br \/>\nexit<\/p>\n<p>Click on Start, run, and type in regedit.<\/p>\n<p>Once you&#8217;re in the Registry Editor, make the following changes (Quotes ARE important!):<\/p>\n<p>HKEY_LOCAL_MACHINE -&gt; SYSTEM -&gt; CurrentControlSet -&gt; Services -&gt; Rsync<\/p>\n<p>Right click on Rsync, New -&gt; Key  Key Name: Parameters<br \/>\nRight click on Parameters New -&gt; String Value<br \/>\n\tValue Name: AppDirectory<br \/>\n\tValue: &#8220;c:\\rsync&#8221;<\/p>\n<p>Right click on Parameters New -&gt; String Value<br \/>\n\tValue Name: Application<br \/>\n\tValue: &#8220;c:\\rsync\\rsync.exe&#8221;<\/p>\n<p>Right click on Parameters New -&gt; String Value<br \/>\n\tValue Name: AppParameters<br \/>\n\tValue: &#8211;config=&#8221;c:\\rsync\\rsyncd.conf&#8221; &#8211;daemon<\/p>\n<p>Close the Registry Editor.<\/p>\n<p>SOURCE MACHINE<br \/>\n******************************************************<br \/>\nIf this is the source machine (ie: a machine you&#8217;d like other machines to copy\/sync with), open up c:\\rsync\\rsyncd.conf in notepad and modify the rsync share setting giving it a well-known, descriptive name.  Modify the path to point to a directory that you want to make available for others to get access too.  Save and close rsyncd.conf.<\/p>\n<p>Open up Administrative Tools either off the Start Menu or in Control Panel. Double click Services. Scroll down the list to Rsync. Highlight it and start the service.<\/p>\n<p>To test it, open up a command prompt and type:<\/p>\n<p>telnet localhost 873<\/p>\n<p>If you get a connection, rsync was installed successfully. Congratulations!<\/p>\n<p>DESTINATION MACHINE<br \/>\n******************************************************<br \/>\nIf this is a machine you&#8217;d like to have copy\/sync with a remote host, then bring up a command line and type:<\/p>\n<p>cd c:\\rsync<br \/>\nrsync -rt &#8211;progress &#8211;delete [INSERT HOST]::[INSERT SHARE] [INSERT DESTINATION PATH]<br \/>\nexit<\/p>\n<p>For example, if I had a staging server located at ip address 10.10.1.162 with a share called &#8220;staging.cephas.net&#8221; that I wanted to sync with, I&#8217;d type something like this:<\/p>\n<p>rsync -rt &#8211;progress &#8211;delete 10.10.1.162::staging.cephas.net f:\/fInetPub\/hosts\/live.cephas.net\/wwwroot\/images\/<\/p>\n<p>where 10.10.1.162 is my staging server, staging.cephas.net is the rsync share, and f:\/fInetPub\/hosts\/live.cephas.net\/wwwroot\/images\/ is the destination that I want to be synced up.  Note that if you don&#8217;t want files deleted from destination that have been deleted in the source, you should remove the &#8211;delete option.<\/p>\n<p>If you&#8217;d like run through a sync as a test, add the -n flag like this:<\/p>\n<p>rsync -rtn &#8211;progress &#8211;delete 10.10.1.162::staging.cephas.net f:\/fInetPub\/hosts\/live.cephas.net\/wwwroot\/images\/<\/p>\n<p>Rsync will list out the files that it *would* have copied\/deleted.<\/p>\n<p>The synchronization can (and probably should) be run as a scheduled task using Windows Task Scheduler.  To do this, create a .bat file, add the following text (substituting your source, share, and destinations):<\/p>\n<p>cd c:\\rsync<br \/>\nrsync -rt &#8211;progress &#8211;delete 10.10.1.162::staging.cephas.net f:\/finetpub\/hosts\/live.cephas.net\/wwwroot\/images\/<\/p>\n<p>and then use the Windows Scheduler (Start &#8211;&gt; Programs &#8211;&gt; Accessories &#8211;&gt; System Tools &#8211;&gt; Scheduled Tasks) to create a task that fires every n (minutes? hours?) per day.<\/p>\n<p>Questions or problems? <a href=\"mailto:aaron.s.johnson@gmail.com\">Email me<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I wrote up these directions (based on directions @ http:\/\/www.hksilver.net\/rsync\/ on a couple weeks ago when I was doing some work with rsync. Someday I&#8217;m sure I&#8217;ll need them again&#8230; and maybe someone else will benefit. So here goes nothing: Download this zip file (which contains cygwin1.dll,instsrv.exe,rsync.exe and srvany.exe) (I mirrored it here) Decompress the &hellip; <a href=\"https:\/\/cephas.net\/blog\/2003\/02\/25\/rsync-installation-and-implementation\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">rsync: installation and implementation<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[12],"tags":[],"_links":{"self":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/posts\/286"}],"collection":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/comments?post=286"}],"version-history":[{"count":0,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/posts\/286\/revisions"}],"wp:attachment":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/media?parent=286"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/categories?post=286"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/tags?post=286"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}