{"id":468,"date":"2008-01-20T21:09:37","date_gmt":"2008-01-21T02:09:37","guid":{"rendered":"http:\/\/blogs.n1zyy.com\/n1zyy\/2008\/01\/20\/easy-backups-on-linux\/"},"modified":"2008-01-20T21:09:37","modified_gmt":"2008-01-21T02:09:37","slug":"easy-backups-on-linux","status":"publish","type":"post","link":"https:\/\/blogs.n1zyy.com\/n1zyy\/2008\/01\/20\/easy-backups-on-linux\/","title":{"rendered":"Easy Backups on Linux"},"content":{"rendered":"<p>It&#8217;s good to keep backups, especially of servers in remote data centers using old hard drives.<\/p>\n<p><tt>rsync -vaEz --progress user@remote:\/path \/local\/path<\/tt><\/p>\n<p>In my case, I&#8217;m doing it as root and just copying \/, although, in hindsight, I think I should have used the &#8211;exclude=&#8230; option&#8230; It doesn&#8217;t make any sense to me to &#8220;back up&#8221; \/proc or \/dev, \/tmp is iffy, and \/mnt is usually not desired.<\/p>\n<p>A few notes: I use &#8211;progress because otherwise it wants to just sit there, which is irritating.<\/p>\n<p>-a is archive, which actually maps to a slew of options. -z enables compression. Note that this may or may not be desirable: on a fast link with a slower machine, this may do more harm than good. There&#8217;s also a &#8211;bwlimit argument that takes KB\/sec as an argument. (&#8211;bwlimit=100 would be 100KB\/sec, or 800kbps.)<\/p>\n<p>Using rsync for backups is nothing new, but it&#8217;s still not used as widely as it could be. A seemingly-common option is to create a huge backup with tar, compress it, and then download the massive file. rsync saves you the overhead of making ludicrously-large backup files, and also lets you just download what&#8217;s changed, as opposed to downloading a complete image every time. It&#8217;s taking forever the first time, since I&#8217;m downloading about 40GB of content. But next time, it&#8217;ll be substantially quicker.<\/p>\n<p>With backups this easy, everyone should be making backups frequently!<\/p>","protected":false},"excerpt":{"rendered":"<p>It&#8217;s good to keep backups, especially of servers in remote data centers using old hard drives. rsync -vaEz &#8211;progress user@remote:\/path \/local\/path In my case, I&#8217;m doing it as root and just copying \/, although, in hindsight, I think I should &hellip; <a href=\"https:\/\/blogs.n1zyy.com\/n1zyy\/2008\/01\/20\/easy-backups-on-linux\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,13,18,19,24],"tags":[],"class_list":["post-468","post","type-post","status-publish","format-standard","hentry","category-computers","category-linux-tips","category-ocd","category-performance","category-rants-raves"],"_links":{"self":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts\/468","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/comments?post=468"}],"version-history":[{"count":0,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts\/468\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/media?parent=468"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/categories?post=468"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/tags?post=468"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}