{"id":18611,"date":"2015-12-02T05:01:43","date_gmt":"2015-12-01T19:01:43","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=18611"},"modified":"2019-12-02T05:46:12","modified_gmt":"2019-12-01T19:46:12","slug":"linux-backup-via-rsync-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/linux-backup-via-rsync-primer-tutorial\/","title":{"rendered":"Linux Backup via rsync Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/Backup\/rsync\/\"><img decoding=\"async\" style=\"float:left;border: 15px solid pink;\" alt=\"Linux Backup via rsync Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/Backup\/rsync\/rsync.jpg\" title=\"Linux Backup via rsync Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">Linux Backup via rsync Primer Tutorial<\/p><\/div>\n<p>On a Macbook Pro laptop you can use the Mac OS X Time Machine approach to backing up your data, as we talked about with <a target=_blank title='Mac Backup Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/mac-backup-tutorial\/'>Mac Backup Tutorial<\/a>.  However, a Mac OS X laptop has access to an underlying Linux operating system, that has had great software, including backup software, written for it over many years.<\/p>\n<p>What would be the advantages of using a Linux method of backing up on a Macbook Pro laptop?  Can think of &#8230;<\/p>\n<ul>\n<li>Linux processes are not in your face &#8230; while you get on with other things in the usual GUI environment<\/li>\n<li>able to be run at a time of your choosing (via shell scripting with crontab, or at login via a .profile arrangement, perhaps), even interactively &#8230; though Time Machine can do some of this too<\/li>\n<li>the backup can run in the background &#8230; though Time Machine can do this too<\/li>\n<li>the backup process could easily leave you a log<\/li>\n<li>Linux backups are capable of handling remote backup tasks and scenarios<\/li>\n<\/ul>\n<p>Today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/Backup\/rsync\/\" title='Click picture'>slideshow<\/a> presentation starts off with a photo of our &#8230;<\/p>\n<ol>\n<li> &#8230; Seagate Backup Plus Portable Drive <a style=\"background-color: green;\" onclick=\"this.style.backgroundColor='green'; document.getElementById('li1').style.display='inline'; \" onmouseover=\"this.style.backgroundColor='green'; document.getElementById('li1').style.display='inline'; \" href=\"#\">\u2139<img decoding=\"async\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/Backup\/rsync\/rsync-276of.jpg\" style=\"display: none;\" id=\"li1\"><\/a> hooked up to our Macbook Pro via a black USB lead plugged into one of the Macbook Pro USB ports<\/li>\n<li>we start up the Macbook Pro application called Terminal in the Utilities folder of the Applications folder<\/li>\n<li>the Linux command\n<p><code> df -k <\/code><\/p>\n<p> will show you the disks and removables (of which our Seagate Backup Plus is one), the latter of which normally get a name starting with &#8220;\/Volumes\/&#8221; as for our &#8220;\/Volumes\/Laura&#8221;<\/li>\n<li>we are going, today, to backup the local MAMP server to the Seagate Backup Plus via\n<p><code> rsync -r \/Applications\/MAMP \/Volumes\/Laura\/ <\/code><\/p>\n<p> as you can see with <a style=\"background-color: green;\" onclick=\"this.style.backgroundColor='green'; document.getElementById('li4').style.display='inline'; \" onmouseover=\"this.style.backgroundColor='green'; document.getElementById('li4').style.display='inline'; \" href=\"#\">\u2139<img decoding=\"async\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/Backup\/rsync\/rsync-279of.jpg\" style=\"display: none;\" id=\"li4\"><\/a> (and on)<\/li>\n<li>now to indicate some success with this to you, we turn the Firefox web browser to Open File one of the backup HTML files (because it is a step too far to think you will be able to run PHP from the backup disk &#8230; perhaps tomorrow) &#8230; maybe you remember india_map.html from the series of blog postings ending with <a target=_blank title='PHP Geographical Image Map Yet More Google Charts Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/php-geographical-image-map-yet-more-google-charts-tutorial\/'>PHP Geographical Image Map Yet More Google Charts Tutorial<\/a> ? &#8230; you can see with <a style=\"background-color: green;\" onclick=\"this.style.backgroundColor='green'; document.getElementById('li5').style.display='inline'; \" onmouseover=\"this.style.backgroundColor='green'; document.getElementById('li5').style.display='inline'; \" href=\"#\">\u2139<img decoding=\"async\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/Backup\/rsync\/rsync-285of.jpg\" style=\"display: none;\" id=\"li5\"><\/a><\/li>\n<li>okay, that works, and so now, what about if india_map.html changes back at the Macbook Pro hard disk&#8217;s MAMP&#8217;s htdocs folder &#8230; we make a change to the &lt;h1&gt;India&lt;\/h1&gt; heading to &lt;h1&gt;India Map&lt;\/h1&gt;\n<li>so now we are going to incrementally backup the local MAMP server to the Seagate Backup Plus via\n<p><code> rsync -ruv \/Applications\/MAMP\/ \/Volumes\/Laura\/MAMP\/ <\/code><\/p>\n<p> as you can see with <a style=\"background-color: green;\" onclick=\"this.style.backgroundColor='green'; document.getElementById('li7').style.display='inline'; \" onmouseover=\"this.style.backgroundColor='green'; document.getElementById('li8').style.display='inline'; \" href=\"#\">\u2139<img decoding=\"async\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/Backup\/rsync\/rsync-293of.jpg\" style=\"display: inline;\" id=\"li7\"><\/a><\/li>\n<li>now to indicate some success with this to you, we turn the Firefox web browser to Open File that same india_map.html HTML file &#8230; as you can see with <a style=\"background-color: green;\" onclick=\"this.style.backgroundColor='green'; document.getElementById('li8').style.display='inline'; \" onmouseover=\"this.style.backgroundColor='green'; document.getElementById('li8').style.display='inline'; \" href=\"#\">\u2139<img decoding=\"async\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/Backup\/rsync\/rsync-294of.jpg\" style=\"display: none;\" id=\"li8\"><\/a><\/li>\n<\/ol>\n<p>Of course, as with all Linux a <\/p>\n<p><code> man rsync <\/code><\/p>\n<p> command <a style=\"background-color: green;\" onclick=\"this.style.backgroundColor='green'; document.getElementById('li0').style.display='inline'; \" onmouseover=\"this.style.backgroundColor='green'; document.getElementById('li0').style.display='inline'; \" href=\"#\">\u2139<img decoding=\"async\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/Backup\/rsync\/rsync-288of.jpg\" style=\"display: none;\" id=\"li0\"><\/a><a style=\"background-color: green;\" onclick=\"this.style.backgroundColor='green'; document.getElementById('li00').style.display='inline'; \" onmouseover=\"this.style.backgroundColor='green'; document.getElementById('li00').style.display='inline'; \" href=\"#\">\u2139<img decoding=\"async\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/Backup\/rsync\/rsync-289of.jpg\" style=\"display: none;\" id=\"li00\"><\/a> helps explain things further, and we hope this tutorial and Linux.com&#8217;s <a target=_blank title='Useful link' href='https:\/\/www.linux.com\/learn\/tutorials\/836851-how-to-backup-files-in-linux-with-the-command-line'>useful link<\/a> is of some help for you too.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d18611' onclick='var dv=document.getElementById(\"d18611\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/backup\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d18611' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>On a Macbook Pro laptop you can use the Mac OS X Time Machine approach to backing up your data, as we talked about with Mac Backup Tutorial. However, a Mac OS X laptop has access to an underlying Linux &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/linux-backup-via-rsync-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,29,37],"tags":[128,337,707,723,725,1746,1252,1319],"class_list":["post-18611","post","type-post","status-publish","format-standard","hentry","category-elearning","category-operating-system","category-tutorials","tag-backup","tag-disk","tag-linux","tag-mac","tag-mac-os-x","tag-rsync","tag-terminal","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/18611"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=18611"}],"version-history":[{"count":13,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/18611\/revisions"}],"predecessor-version":[{"id":47324,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/18611\/revisions\/47324"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=18611"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=18611"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=18611"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}