{"id":81,"date":"2023-07-19T20:57:26","date_gmt":"2023-07-19T20:57:26","guid":{"rendered":"https:\/\/linuxlore.com\/?p=81"},"modified":"2024-07-31T13:36:27","modified_gmt":"2024-07-31T18:36:27","slug":"rsync","status":"publish","type":"post","link":"https:\/\/linuxlore.com\/index.php\/2023\/07\/19\/rsync\/","title":{"rendered":"rsync"},"content":{"rendered":"\n<p class=\"has-medium-font-size\">In a previous post I shared my sad story of backup and restore woes &#8211; mostly restore woes&#8230;  Fortunately for me, there is a solution.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p class=\"has-medium-font-size\">There is a program called <a rel=\"noreferrer noopener\" href=\"https:\/\/en.wikipedia.org\/wiki\/Rsync\" target=\"_blank\">rsync<\/a>.  I suppose the &#8216;r&#8217; hints that this program can work on remote disks; and the &#8216;sync&#8217; part probably means that it can synchronize the disks.  It&#8217;s a fairly old program, evidently first released in 1998 or so (according to Wikipedia).<\/p>\n\n\n\n<p class=\"has-medium-font-size\">This program has a huge number of <a href=\"https:\/\/web.archive.org\/web\/20240513215329\/https:\/\/linux.die.net\/man\/1\/rsync\" target=\"_blank\" rel=\"noreferrer noopener\">options<\/a>, a bewildering number of them.  That suggests to me that over time, various sysadmins needed some particular features, and either put it in themselves, or encouraged a programmer to do it.  At any rate, it is almost certain that rsync can do anything I might conceive of asking it to do.<\/p>\n\n\n\n<p class=\"has-medium-font-size\">I tried rsync out, saving various directories to an external drive.  It works well, without surprises.  When I backed up files where some had already been backed up, rsync skipped those.  If the modification time and size where identical, it ignored that file.<\/p>\n\n\n\n<p class=\"has-medium-font-size\">This feature makes it far easier to back up the system, once the original backup has been made.  The first one might be a bit tedious, if you&#8217;ve got a lot of data to back up.  Once you&#8217;ve done that, rsync only backs up the files you&#8217;ve changed, and those you&#8217;ve created. <\/p>\n\n\n\n<p class=\"has-medium-font-size\">I like that rsync doesn&#8217;t get fancy.  It basically copies files.  When you&#8217;re done, you can look at the destination directory and see the files and file structure.  No compression, no incremental data issues.  You get files, complete files.<\/p>\n\n\n\n<p class=\"has-medium-font-size\">This of course takes up more disk space than a backup that also compresses.  And it also takes up more space than those programs that only add the incremental changes from the previous backup.  This might seem a serious disadvantage, but in my experience it is not.<\/p>\n\n\n\n<p class=\"has-medium-font-size\">The compressed, incremental backups I made with another program were basically a mess of 50 MB files, each compressed, and containing either the full backup information, or the incremental values.  When the restore process failed, I had no way of retrieving the data.<\/p>\n\n\n\n<p class=\"has-medium-font-size\">With rsync, I am not so hampered.  Since the files are copies of what&#8217;s on the source disk, I don&#8217;t have to worry about trying to decode them.  They&#8217;ve never been encoded.<\/p>\n\n\n\n<p class=\"has-medium-font-size\">Restoring is as simple as reversing source and destination.  That&#8217;s if you want to do a full restore.  If you&#8217;re only after a couple of files you can simply find them on the backup disk, and copy them over by hand.<\/p>\n\n\n\n<p class=\"has-medium-font-size\">Ultimately, rsync looks as though it&#8217;s the best option for me to do backups.  Simple to use, safe, easy to find saved files.<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In a previous post I shared my sad story of backup and restore woes &#8211; mostly restore woes&#8230; Fortunately for me, there is a solution.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-81","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/linuxlore.com\/index.php\/wp-json\/wp\/v2\/posts\/81","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxlore.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxlore.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxlore.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxlore.com\/index.php\/wp-json\/wp\/v2\/comments?post=81"}],"version-history":[{"count":5,"href":"https:\/\/linuxlore.com\/index.php\/wp-json\/wp\/v2\/posts\/81\/revisions"}],"predecessor-version":[{"id":164,"href":"https:\/\/linuxlore.com\/index.php\/wp-json\/wp\/v2\/posts\/81\/revisions\/164"}],"wp:attachment":[{"href":"https:\/\/linuxlore.com\/index.php\/wp-json\/wp\/v2\/media?parent=81"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxlore.com\/index.php\/wp-json\/wp\/v2\/categories?post=81"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxlore.com\/index.php\/wp-json\/wp\/v2\/tags?post=81"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}