{"id":1858,"date":"2015-02-13T00:00:27","date_gmt":"2015-02-13T08:00:27","guid":{"rendered":"http:\/\/192.168.3.4\/?p=1858"},"modified":"2018-01-09T06:49:49","modified_gmt":"2018-01-09T14:49:49","slug":"rpi-backup-and-restore","status":"publish","type":"post","link":"https:\/\/www.cloudacm.com\/?p=1858","title":{"rendered":"RPi Backup and Restore"},"content":{"rendered":"<p><strong>Introduction &#8211; rapid deploy many or custom build one<\/strong><\/p>\n<p>In this topic I&#8217;ll cover the steps to backup and restore a RPi.\u00a0 There are numerous write ups about the subject, so I feel a bit plagiaristic about doing this.\u00a0 However, giving someone to ability to save time and effort is worth it.\u00a0 I will give credit to <a href=\"http:\/\/lifehacker.com\/how-to-clone-your-raspberry-pi-sd-card-for-super-easy-r-1261113524\" target=\"_blank\">Whitson Gordon<\/a> who posted steps that I found online.\u00a0 I&#8217;ll try not to be too verbatim, adding some of my reasoning and experiences.<\/p>\n<p><strong>Purpose &#8211; the kiosk users are waiting for your talents, (your name here)<\/strong><\/p>\n<p>Last week MCM Electronics announced the newest version of RPi available to the public.\u00a0 Unlike the last change that had several physical changes, this one was more system orientated.\u00a0 I won&#8217;t go into all the details, you can <a href=\"http:\/\/www.mcmelectronics.com\/content\/en-US\/raspberry-pi\" target=\"_blank\">find it here<\/a>.\u00a0 Since it was such an improvement, I went ahead and ordered one.\u00a0 I haven&#8217;t done much with the July 2013 release Model B+.\u00a0 Most of my development has been on the older Model B.\u00a0 Now that this newer Model B G2 is due to arrive any day, I thought I&#8217;d clone my B+ and use the image on the G2.<\/p>\n<p>Even though this might seem like a one off, the steps could be used to do a one to many deploy.\u00a0 This brings back my earlier work developing a video sign for an office.\u00a0 Getting the base system ready and cloning it out was the last step.\u00a0 This is huge.\u00a0 Without this ability, the idea of using the RPi out in the field is not scalable.<\/p>\n<p><strong>Details &#8211; lets clone it<\/strong><\/p>\n<p>First off, let me state that the source media size will need to match the destination media size.\u00a0 I had attempted to do a backup of a 32GB SD card and restore it to a 8GB SD card.\u00a0 This may seem obvious, but I feel this needs to be stated.\u00a0 My reasoning was the actual disk use was 4GB, so it was assumed that it would fit on the new 8GB SD card.\u00a0 Just keep that in mind.<\/p>\n<p>Now lets start by using a RPi that has been built and configured.\u00a0 If yours is on, turn it off.\u00a0 We&#8217;ll need to do this before removing the SD memory card.\u00a0 We&#8217;ll be using a Windows machine, so if you&#8217;re using a <a href=\"http:\/\/raspberrypi.stackexchange.com\/questions\/311\/how-do-i-backup-my-raspberry-pi\" target=\"_blank\">Mac or Linux only<\/a>, please accept my apologies.\u00a0 You&#8217;re in luck if you have a Mac, found this video&#8230;<br \/>\n<iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/pZFHQ_BsSQk\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>Insert the SD card into your Windows computer.\u00a0 Start the <a href=\"http:\/\/sourceforge.net\/projects\/win32diskimager\/\" target=\"_blank\">Win32DiskImager<\/a> program. In the &#8220;Image File&#8221; box, enter the path of the image file you&#8217;ll be creating.\u00a0 Under the &#8220;Device&#8221; box, select your SD card.\u00a0 Click the &#8220;Read&#8221; button to create the image file from your card.\u00a0 Do be mindful that this will take awhile to complete.\u00a0 When it&#8217;s done creating the image file, you can eject your SD card and put it back in your Raspberry Pi.<\/p>\n<p>The work is done as far as backup goes, you now have an image to use.\u00a0 This leads us to the next step which is restoring an image.\u00a0 It&#8217;s basically the same thing in reverse with some change ups.<\/p>\n<p>I&#8217;ve got a new SD card that I ordered with the new G2 RPi.\u00a0 This will be a great opportunity to check the image restore procedures.\u00a0 First we&#8217;ll insert the new SD card into the computer.\u00a0 The drive isn&#8217;t quite ready to use yet.\u00a0 First we need to delete any partitions on it using Disk Manager.\u00a0 Once that is done, then we can format it so Windows will recognize it.\u00a0 Now we&#8217;re ready to use it in Windows.\u00a0 Next we&#8217;ll start Win32DiskImager.\u00a0 In the &#8220;Image File&#8221; box, we&#8217;ll select the image we created earlier.\u00a0 Under the &#8220;Device&#8221; box, select the SD card.\u00a0 Click the &#8220;Write&#8221; button to write the image file to your card.\u00a0 This can take even longer, depends on the card type.\u00a0 Plan on doing other things.\u00a0 After it finishes, you&#8217;ll have a ready to use SD card in another RPi.<\/p>\n<p>That&#8217;s it!\u00a0 I suggest you save and save often.\u00a0 If you&#8217;ve been following along, we&#8217;ve covered a lot of material.\u00a0 No sense in losing all that hard work from a bad SD card.\u00a0 This simple process will save you time and effort.<\/p>\n<p>If you want to see it from start to finish, here is a video&#8230;<br \/>\n<iframe loading=\"lazy\" width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/7QYr9x9LXLk\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<p><strong>Relations &#8211; how the big players do it<\/strong><\/p>\n<p>Even though this may seem simplistic, it is fundamentally how large manufacturers accomplish mass deployment.\u00a0 If you plan to deploy the RPi enmasse, this will be a major part of that effort.\u00a0 It will allow easier development, debugging, and deployment.<\/p>\n<p><strong>Summary &#8211; one to many, many to one<\/strong><\/p>\n<p>The backup and restore of the RPi involves creating images of the SD memory card.\u00a0 The process we have defined here makes use of a program called Win32DiskImage that runs only on Windows systems.\u00a0 We stepped through the procedures to making a backup of the SD card as well as the restore to a separate SD card.\u00a0 The process can take a considerably long amount of time, so be sure to plan accordingly.<\/p>\n<p>Now that you have the ability to backup, feel at ease making changes to your RPi.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction &#8211; rapid deploy many or custom build one In this topic I&#8217;ll cover the steps to backup and restore a RPi.\u00a0 There are numerous write ups about the subject, so I feel a bit plagiaristic about doing this.\u00a0 However, giving someone to ability to save time and effort is worth it.\u00a0 I will give credit to Whitson Gordon who posted steps that I found online.\u00a0 I&#8217;ll try not to be too verbatim, adding some of my reasoning and experiences&#8230;.<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/www.cloudacm.com\/?p=1858\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-1858","post","type-post","status-publish","format-standard","hentry","category-raspberry-pi"],"_links":{"self":[{"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/posts\/1858","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1858"}],"version-history":[{"count":15,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/posts\/1858\/revisions"}],"predecessor-version":[{"id":1869,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/posts\/1858\/revisions\/1869"}],"wp:attachment":[{"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1858"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1858"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1858"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}