How to Backup your SDcard


12 posts
by OldMarty » Sat Dec 22, 2012 2:52 am
Hi All,

I've created a newbies version of "How to backup your R-Pi SD card", to make it clear & simple for all of us ;-).
For my example, I'm using Windows7 & "Win32DiskImager" for this example, but i'm sure it's basically the same for the linux version.


Ok, so you have your Raspberry Pi distro running, Appz are installed and everything configured EXACTLY how you want it.
Now you should backup your SDcard for future use, in case it dies one day (believe me, it WILL die), and i personally hate re-installing everything over & over again ;-(
So, lets create a backup image of your R-pi system....

Plug your SDcard into your laptop/pc/card-reader and wait until Windows finds it etc etc
( For this example, my SDcard appears as E:\ )

Step 1:
Startup the "Win32DiskImager" program, Here's the opening screen:
Notice you will need to select which drive is your SDcard. in this case my SDcard is E:\
then click the NAVIGATE icon just next to the E:\ pulldown box, this will open a file-explorer window.
(Also note that the "read" button is not available to use just yet).
Image

Step 2:
Select a folder on your hard-drive where you want to SAVE the image file of your SDcard. In my example, i have a folder named "rpi_backups".
Also type in a filename of the image you're about to create, and click SAVE to continue to next step.
Note:
I prefer to always include the SIZE of the SDcard somewhere in the filename, which is handy later on when you have odd sized SDcards that may require partition-resizing after being restored.
( e.g. burning your 8Gb image onto a 32Gb card, you'll need to resize, so you can use the entire 32Gb )
Image

Step 3:
Confirm the folder/filename are correct, and now you can click the READ button to start reading your SDcard into your (about-to-be-created) image file.
Image

Step 4:
Here's my image file being written, almost complete at 95% ....
Image

Step 5:
It will indicate "Done" when the image has finished writing.
Image


....and that's it !
Now can play with multiple Pi-distro's, try new Appz and always be able to revert back to your original (preferred) Pi images ;-)

I hope this helps ;-)
Marty.
Posts: 7
Joined: Wed Dec 19, 2012 12:34 pm
by Pytlicek » Sun Dec 23, 2012 12:18 pm
Yes :) Thanks
Sorry for my English :)
User avatar
Posts: 12
Joined: Sun Jul 01, 2012 4:11 pm
Location: Slovakia
by thsBavR10 » Sun Dec 23, 2012 1:02 pm
Now can play with multiple Pi-distro's, try new Appz and always be able to revert back to your original (preferred) Pi images ;-)
I hope this helps ;-)
Marty.

Hi Marty,

If you are limited in space on harddisk, you may add "Step 6" (like i'm doing):
Compress the SD card image with 7-Zip or alike,
it saves you about 80%-90% of space, if you are choosing 7z as destination type.
clipboard.jpg
screenshot 7-Zip
clipboard.jpg (44.73 KiB) Viewed 6062 times


Thomas
Posts: 201
Joined: Sat Jul 21, 2012 3:11 pm
by Andy123 » Tue Dec 25, 2012 6:08 pm
OldMarty wrote:Note:
I prefer to always include the SIZE of the SDcard somewhere in the filename, which is handy later on when you have odd sized SDcards that may require partition-resizing after being restored.
( e.g. burning your 8Gb image onto a 32Gb card, you'll need to resize, so you can use the entire 32Gb )

Please explain the partition-resizing thing & how it should be done if your example does in fact come true (8GB image to 32 GB).
Thanks.
Posts: 1
Joined: Tue Dec 25, 2012 5:54 pm
by Toby Branfoot » Wed Jan 02, 2013 1:21 am
Thanks OldMarty for this ... I am following your (and a few others) guides to backing up my SD card ... it's one thing flashing a new OS ... but then adding/updating libraries like pygame, timidity, numpy, gnash, etc ... and then installing more significant software like LibreOffice and IceWeasel ... and further updating everything ... as well as downloading source-code and the like for for Python and Scratch books that I have got hold of. NOT something I want to do repeatedly ... but I have ... developing a set-up for a few Xmas presents for children.

But the RPi seems "fragile" ... a power cable pulled out "accidentally" ... and the card seems to need re-flashing ... booting to LXDE directly seems user-friendly ... but if they then forget to, or can't shutdown (because the system has locked up in some fashion) ... again ... dead to restarting ...

I have just used Win32DiskImager (up until now just used successfully to flash the latest version of Wheezy to an SD card) to copy the currently working SD card back to my Windows PC ... am I right that doing this regularly will "back-up" the whole system ... and enable a relatively swift "restore" of the whole set-up? And if I e-mail this on, my nieces/nephews/friends systems can be re-flashed to restore things if their's get messed up? So ideally, they should save/back-up their own files to another USB card or the like (in addition?) so if/when the primary system SD card needs re-flashing from the "main" backup to restore the "system" their personal files can also be restored?

Maybe this is "obvious" ... but can you confirm I am thinking straight and doing it right?

Cheers

Toby
Posts: 21
Joined: Thu Nov 15, 2012 8:59 am
by athome42 » Tue Jan 08, 2013 7:09 pm
Hi
tried this using Win32diskimager to back-up the "system" but Windows 7 reported insufficient space i.e. disk full but Windows 7 also reports that there is 149Gb free.

Am I doing something wrong?
Al - http://athome42.com
Posts: 10
Joined: Tue Dec 25, 2012 7:02 pm
Location: Reading UK
by Jim JKla » Tue Jan 08, 2013 7:13 pm
That could just be Windows7 playing hard to get. ;)

Look at all that run as administrator rubbish. I am verry pleased I am still running on a combo of XP Pro and Ubuntu/RaspberryPi :D

Look at where you are saving the file.
Noob is not derogatory the noob is just the lower end of the noob--geek spectrum being a noob is just your first step towards being an uber-geek ;)

If you find a solution please post it in the wiki the forum dies too quick
User avatar
Posts: 1912
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK
by athome42 » Tue Jan 08, 2013 9:05 pm
Successfully backed up as adminstrator to my master 500Gb with 440Gb free space and NTFS file format. Repeated process to my secondary drive with 66Gb free space (correction from originaly stated 149Gb) and backup failed, then I noticed the secondary drive is FAT32 format.

Could this be the reason???
Al - http://athome42.com
Posts: 10
Joined: Tue Dec 25, 2012 7:02 pm
Location: Reading UK
by Jim JKla » Tue Jan 08, 2013 9:30 pm
Make it with NTFS then copy the file to the Fat32 space. ;)
Noob is not derogatory the noob is just the lower end of the noob--geek spectrum being a noob is just your first step towards being an uber-geek ;)

If you find a solution please post it in the wiki the forum dies too quick
User avatar
Posts: 1912
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK
by PiSi » Sun Jan 20, 2013 2:40 pm
Done the backup but when I look at my SD card in Windows Explorer it only seems to show the system files using only around 15MB and cannot see the user folders and .py files I have created.

Is this just Windows only showing 1 partition on the card?

Will the backup image via Win32DiskImager have copied everything off the SD card, including my user files, or just what Windows can see?

Thanks,

Simon
Posts: 23
Joined: Mon Jan 14, 2013 9:41 am
by Dilligaf » Sun Jan 20, 2013 3:31 pm
If you use Usbit in device mode rather than win32imager it will create a compressed .img.gz which will save a lot of space, it will also write the compressed image back to the card. Just uncheck check file size >4G in options (will not work if saving to a fat filesystem)
Posts: 186
Joined: Wed May 23, 2012 6:48 pm
by Jim JKla » Sun Jan 20, 2013 4:30 pm
If you used Win35DiskImage you will have everything.

But as PiSi says its uncompressed, Win32DiskImage is quick dirty but it does the job. ;)
Noob is not derogatory the noob is just the lower end of the noob--geek spectrum being a noob is just your first step towards being an uber-geek ;)

If you find a solution please post it in the wiki the forum dies too quick
User avatar
Posts: 1912
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK