Raspberry Pi OS Backup and Restore
Operating System Images¶
Operating systems for the Raspberry Pi computer are distributed as ISO files. Choose one of the following options:
- Install everything from scratch, starting from a clean Raspberry Pi OS image.
- Flash a system image with all software components pre-installed, from a system snapshot.
Raspberry Pi OS¶
Use the Raspberry Pi Imager to flash a clean Raspberry Pi OS 64-bit Lite image, as explained in the RPi OS installation guide.
Alternatively, download the Raspberry Pi OS ISO from the official website, and flash it to a micro SD card.
System Snapshot¶
Custom system images are uploaded to Google Drive, but are not kept up-to-date.
Download an ISO using the links below:
Warning
These images do not have the latest versions of OLA's software, and the upgrade path is undocumented. You may instead try starting from scratch.
After the download completes, flash it to a micro SD card.
Next steps¶
Depending on the image you flahsed:
- Snapshot install (i.e. from our ISO) proceed to the electronics setup guide directly.
- Optionally check if the filesystem has expanded with
df -h(pishrink images only). If not expanded, reboot the Pi. It may take a couple reboots.
- Optionally check if the filesystem has expanded with
- Clean Raspberry Pi OS, install all required software first, as explained in the software setup guide.
Utilities¶
Backup OS image¶
Note: extra details at raspberrypi.org archive.
Details at: https://www.raspberrypi.org/documentation/linux/filesystem/backup.md
Using dd and gunzip¶
To create the compressed filesystem backup, we used:
# Replace "sda" with your SD card's actual device name (you may use "lsblk" to find it).
sudo dd bs=4M status=progress if=/dev/YOUR_SD_CARD_DEVICEYOUR_SD_CARD_DEVICE | gzip > pipettin_pi.img.gz
sync
Uncompressed (very large) images can be saved as well:
# Replace "sda" with your SD card's actual device name (you may use "lsblk" to find it).
sudo dd bs=4M status=progress if=/dev/YOUR_SD_CARD_DEVICE of=pipettin_pi.img
sync
PiShrink images¶
A system image can be automatically shrunk using PiShrink. The main benefit is that the filesystem is also shrunk, so it can be used in SD cards smaller than the original.
The image will "auto-expand" to fill the new SD card during the first boot of the Pi, in a way similar to regular RPi OS images.
First install PiShrink on your system: https://github.com/Drewsif/PiShrink?tab=readme-ov-file#installation
You may then use the following commands to make a backup and shrink the image: