Raspberry Pi + backup SD card using dd


Umount all partitions:

umount /dev/name_of_partition

To backup:

sudo dd if=/dev/mmcblk0 of=~/name_of_image.img

To restore:

dd bs=4M if=~/name_of_image.img of=/dev/mmcblk0

Another way:


sudo fdisk -l
sudo dd bs=4M if=/dev/sdb | gzip > /home/your_username/image`date +%d%m%y`.gz

To restore:

sudo gzip -dc /home/your_username/image.gz | dd bs=4M of=/dev/sdb


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s