Raspberry PI – creating a backup image while the Raspberry PI is running
How to create a backup image of your SD card while your Raspberry PI is running?
You can create a backup (.img) of your SD card to a network / USB drive while the card is inserted in your Raspberry PI!
- make sure you have access to your network drive / usb drive;
to see the devices type:
sudo cat /etc/fstab
- create an img of the card currently in the PI to your network drive / USB drive using the dd command:
sudo dd if=/dev/mmcblk0p2 of=/home/pi/networkdrive/my.img bs=1M
(replace /dev/mmcblk0p2 with your own SD card and /home/pi/networkdrive/my.img with your own network drive / USB drive + image file name)
Good luck!