Easy SD card images with Linux

To create from SD:

# dd if=/dev/sdb | gzip > backup.img.gz

To restore on a SD:

# cat backup.img.gz | gunzip | dd of=/dev/sdb