Here’s a short and useful line to backup raspberrys entire SD Card:
dd if=/dev/mmcblk0 of=/path/to/image.img bs=1M
This creates the file image.img, which contains the entire SD-Card,
you can write it back to the SD Card to restore it.
For this you can use ImageWriter, or just use the reverse command:
dd if=/path/to/image.img of=/dev/mmcblk0