To copy a SD-Card to another one including all partitions yo can take the following steps:
- Find out the device name (f.e.: /dev/mmcblk0):
- Copy the whole card to an imagefile (Backup):
$> sudo dd if=/dev/mmcblk0 of=backup_pi.img bs=4M
- Restore the backup image to the other card:
$> sudo dd of=/dev/mmcblk0 if=backup_pi.img bs=4M