Raspberry Pi backup
Raspberry Pi backup – keep your astro-photography system image safe in case of failure, loss or mistakes that prevent your RPi booting up.
Follow the step by step guide below.
Backup your Raspberry Pi?
Most of us usually fail to protect our data and systems properly, its part of the human condition. We buy house insurance not because we know we are going to have a fire but because we understand that being homeless is unpleasant if we do. So is losing you astro-photography automation system and starting again from scratch. All those tweaks, INDI profiles and history gone just because the SD card fell out of the slot one dark night in the field never to be seen again. Have I convinced you yet?
Doing a backup is easy but can take a while whilst copying the data somewhere safe (don’t lose the backups either!) so its a cloudy night job. Don’t forget to name your saved images something appropiate so you know what was the last one so I recommend having a date in there in the format year-month-day so they order nicely in your file explorer, e.g. “Astroberry-RPi 2020-10-31”.
I backup after each software update or significant reconfiguration and keep a rolling 5 youngest date based backups so I can always revert back a version if needed.
I don’t really need to backup do I? a warning…
Did you know that the typical lifespan on an SD Card in a Rasperberry pi can be as low as 2 years before data loss?
SD cards are in essence, identical to flash drives and SSDs. All 3 storage solutions employ what we know as NAND-based flash memory to persist data without power. The main difference between SD cards/flash drives and the more expensive SSDs lie in the underlying technology of the NAND flash used. SD cards and flash drives alike typically use MLC (Multi-level cell) technology where multiple (up to 5) bits of information are stored in a single storage element, whereas SSDs typically use SLC (Single-level cell) technology where only 1 bit of information is stored in a single storage element.
SD Cards will therefore experience the effects of wear and tear earlier than in SSDs and other storage media due to their storage technology which entails a shorter lifespan, especially if your usage is write-heavy. Unfortunately, practically everything out there has a write-heavy component with the exception of simple scheduled scripts, so you’d expect to replace the SD card on your Raspberry Pi, on average, every 2 years.
Shutdown your RPi, remove the SD card fro the rear slot and insert this into your computer (using an SD card adapter). Usually WIndows explorer will open automatically so note the drive letter of your card (Windows can only see the boot partition part of the card).
To prevent mistakes, I recommend removing any other SD cards from your system so you get the right drive letter, easy mistake to make!
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).
Finally with our device set and our new filename set we can begin the backup process. To do this, we need to click the “Read” button. Please note that this can take some time as it is a complete backup of your SD Card, meaning every single byte is replicated.
I will repeat again, you must hit READ – do not click “Write” otherwise you will wipe your card (you have another backup right?)
This is going to take a while – sit back and relax – have a cup of tea…
Put the card back in your Raspberry Pi and you are ready to go…
You may also like…
SD card expansion allows the full use of the space on a larger SD Card after you created your new...
You have set up your Raspberry Pi, Astroberry has been imaged to your SD card, here are some tips...