{"id":14835,"date":"2021-12-27T12:00:43","date_gmt":"2021-12-27T19:00:43","guid":{"rendered":"https:\/\/macblaze.ca\/?p=14835"},"modified":"2021-12-28T14:01:50","modified_gmt":"2021-12-28T21:01:50","slug":"rsync","status":"publish","type":"post","link":"https:\/\/macblaze.ca\/?p=14835","title":{"rendered":"Rsync&#8230;"},"content":{"rendered":"<h2>Or, How tech support isn&#8217;t all that supportive<\/h2>\n<p>In our last exciting instalment we were quite happy with our new web home except for one feature&#8230;the lack of <code>rsync<\/code>. Today, the exciting conclusion&#8230;<\/p>\n<h3>The issue<\/h3>\n<p>I use <a href=\"https:\/\/gohugo.io\/getting-started\/\" target=\"_blank\" rel=\"noopener\">Hugo<\/a> to generate a static files for several of my sites. One Hugo site is hosted on Netlify and is based off GitHub. So all I do is edit the files and sync them to Github. Netlify then grabs the files, compiles them and updates the site. It&#8217;s a great system and, FWIW, completely free.<\/p>\n<p>The other main site that employs Hugo is my professional site (<a href=\"https:\/\/astart.ca\" target=\"_blank\" rel=\"noopener\">astart.ca<\/a>) and with it I went a different route. I make the changes and using a <a href=\"https:\/\/gohugo.io\/hosting-and-deployment\/deployment-with-rsync\/\" target=\"_blank\" rel=\"noopener\">handy script from the Hugo site<\/a>, I run a command \u2014 <code>.\/deploy<\/code> \u2014 and it automatically compiles the site then uploads it immediately to my web host. Or at least it did. Rsync didn&#8217;t seem to work on my new host.<\/p>\n<h3>Call support<\/h3>\n<p>Of course in the new a modern age you can just click on a link and chat with support. So I did. They informed me that my shared hosting did not include root access and I would need root access to use rsync. If I wanted I could upgrade to a cloud server&#8230; only ~$43\/month. Lol. Seriously ROTFL. I mean ROTFLMAO. That would magically transform my $148 cad investment into $1584. Did I mention Lol?<\/p>\n<p>I thanked him politely and went looking for another solution.<\/p>\n<h3>Everything is somewhere on the internet<\/h3>\n<p>One search phrase and a couple of clicks later and I arrived here: <a href=\"http:\/\/oerinet.net\/wordpress\/synchronizing-files-with-rsync-on-godaddy-shared-hosting\/\" target=\"_blank\" rel=\"noopener\">http:\/\/oerinet.net\/wordpress\/synchronizing-files-with-rsync-on-godaddy-shared-hosting\/<\/a>. It was GoDaddy specific so I wasn&#8217;t 100% sure it work but what the heck. But it did. After following his instructions I had to change one word in my script as well as the login credentials and I was <a href=\"https:\/\/idioms.thefreedictionary.com\/in+like+Flynn\" target=\"_blank\" rel=\"noopener\">in like Flynn<\/a>.<\/p>\n<h4>For posterity<\/h4>\n<p>So what I did was (all according to the above link):<\/p>\n<p><code>ssh<\/code> into the server \u2014 I had already set this up.<\/p>\n<pre><code>mkdir ~\/bin\n\necho '#!\/bin\/bash'&amp;gt;~\/.bash_profile\necho 'PATH=\"$HOME\/bin:$PATH\"'&amp;gt;&amp;gt;~\/.bash_profile\nchmod +x ~\/.bash_profile\n<\/code><\/pre>\n<pre><code>cd ~\/bin\nwget http:\/\/www.oerinet.net\/files\/godaddy_bin\/rsync.gz\ngunzip *.gz\nchmod +x *\n<\/code><\/pre>\n<p>Grab the path<\/p>\n<pre><code>cd ~\/bin\npwd\n<\/code><\/pre>\n<p>and edit the deploy script.<\/p>\n<p>Abracadabra!<\/p>\n<h3>Sweet, sweet success<\/h3>\n<p>Apparently I could also install <code>nano<\/code> this way. I will have to grab his copy of the rsync and nano installers and store them somewhere. I am not sure if they are commonly available in single packages although I would guess they are&#8230;<\/p>\n<p>Because <em>&#8220;Everything is somewhere on the internet&#8221;<\/em>&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Or, How tech support isn&#8217;t all that supportive In our last exciting instalment we were quite happy with our new web home except for one feature&#8230;the lack of rsync. Today, the exciting conclusion&#8230; The issue I use Hugo to generate a static files for several of my sites. One Hugo site is hosted on Netlify [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false},"categories":[1],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/macblaze.ca\/index.php?rest_route=\/wp\/v2\/posts\/14835"}],"collection":[{"href":"https:\/\/macblaze.ca\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/macblaze.ca\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/macblaze.ca\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/macblaze.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14835"}],"version-history":[{"count":6,"href":"https:\/\/macblaze.ca\/index.php?rest_route=\/wp\/v2\/posts\/14835\/revisions"}],"predecessor-version":[{"id":14868,"href":"https:\/\/macblaze.ca\/index.php?rest_route=\/wp\/v2\/posts\/14835\/revisions\/14868"}],"wp:attachment":[{"href":"https:\/\/macblaze.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14835"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/macblaze.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14835"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/macblaze.ca\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14835"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}