So you have created an awesome Raspberry Pi project and you need your Pi for another project. What do you do? Either you buy a new Raspberry Pi or you are going to need to find a way to backup you Raspberry Pi. Luckily backing up your Raspberry Pi is easy, and here is a step-by-step guide for you.
Prerequisites & Equipment
Here is what you need to backup your Raspberry Pi.
- SD Card from your Raspberry Pi or Raspberry Pi Zero project
- Windows computer with a SD card reader
Please note that this guide is written for Windows based computers, but the concepts are the same for linux computers. On Linux you can use the command line built-in program called dd (more info on dd here).
Download and install Win32DiskImager
To backup (and restore) our SD card we need a program that can read SD cards and create a image based on the contents. Likewise for restoring a Raspberry Pi project we are going to need a program that can read the image and write it back to the SD card. For both backing up and restoring we can use a program called Win32DiskImager. The program it is available here for free. Hit the download link and once it is downloaded extract the program to a folder on your computer.
Backup Raspberry Pi using Win32DiskImager
To backup your SD card insert it into your computer (note the drive letter) and start the Win32DiskImager program. Once started select the SD card drive letter in the device drop-down – it is important you select the right one since this is the drive that is being backed up.
Next you want to tell the program where to put your backup. Press the folder button next to “Image file” and navigate to the folder where you would like to store the backup.
Once you are in the correct folder write the name of your backup in the file name text box and press “Open” (this is not very intuitive but no worries it will work).
The last step is reading your SD card into the image file – this is done by pressing “Read”. It is important that you do not hit write since writing will overwrite your SD card. After pressing read the screen will look as follows:
The process will take a few minutes and once it is done you have a backup of your Raspberry Pi project on your hard-drive. Read on to figure out how to restore a Raspberry Pi SD card image.
Restore Raspberry Pi backup using Win32DiskImager
So your dog chewed up the SD card holding your favorite Raspberry Pi project? Fear not – being smart you made a backup (as described above) and I am here to help you restore it onto a SD card.
Restoring a SD card backup is real simple simply plug-in your SD card – wait for a minute for it to be recognized by Windows. When it is recognized by Window take note of the drive letter and start the Win32DiskImager (see above for download link).
Once Win32DiskImager is started press the little folder under “Image file” and select your backup image. Next select the drive letter of your SD card under “Device”.
NOTE: Do not proceed unless you are 100% sure that the drive letter selected is your SD card.
Now press “Write” and sit back and relax while the program restores your backup onto your SD card. Once the write process is done unplug the SD card – plug it into your Raspberry Pi and apply power. You have now restored your backup!