wardmundy
Nerd Uno
- Joined
- Oct 12, 2007
- Messages
- 19,170
- Reaction score
- 5,199
We've found a new way to make Raspberry Pi images, and I thought I'd share it since it also works as an ideal way to backup production servers running on the RasPi platform since you can perform the backups in place with a removable microSD card (not the one you booted the RasPi from obviously).
To get started, you'll need a USB-MicroSD adapter. Our favorite is the Vanja ($6.99 on Amazon).
For the backup microSD card, you need one large enough to hold all of the data (df -h) that you've used on your primary microSD card. For example, if your boot device is a 32GB SD card, but you've only used 12GB of space, then you can use a 16GB microSD card as the backup device. It will still be bootable.
To get started, format the backup microSD card as an MSDOS partition. Tutorial here.
Unless you're using an Incredible PBX 2020.3 build, you will need to install rpi-clone. Tutorial here. You can skip the step of setting the hostname.
Now we're ready to begin. Make sure your RasPi is up and running with the microSD card to be cloned.
1. Insert your USB adapter with the microSD card to be used for the backup.
2. Run fdisk -l to decipher its identity, typically sda.
3. Issue the following command to make the bootable backup image: rpi-clone -f sda
4. Shutdown your RasPi: halt
5. Remove the USB stick.
6. Boot your RasPi using the microSD backup to be sure it works.
7. Shutdown your RasPi and store the backup microSD card in a safe place.
To get started, you'll need a USB-MicroSD adapter. Our favorite is the Vanja ($6.99 on Amazon).
For the backup microSD card, you need one large enough to hold all of the data (df -h) that you've used on your primary microSD card. For example, if your boot device is a 32GB SD card, but you've only used 12GB of space, then you can use a 16GB microSD card as the backup device. It will still be bootable.
To get started, format the backup microSD card as an MSDOS partition. Tutorial here.
Unless you're using an Incredible PBX 2020.3 build, you will need to install rpi-clone. Tutorial here. You can skip the step of setting the hostname.
Now we're ready to begin. Make sure your RasPi is up and running with the microSD card to be cloned.
1. Insert your USB adapter with the microSD card to be used for the backup.
2. Run fdisk -l to decipher its identity, typically sda.
3. Issue the following command to make the bootable backup image: rpi-clone -f sda
4. Shutdown your RasPi: halt
5. Remove the USB stick.
6. Boot your RasPi using the microSD backup to be sure it works.
7. Shutdown your RasPi and store the backup microSD card in a safe place.
Last edited: