Backup MBR record — assuming your first disk is sda.
dd if=/dev/sda of=backup-sda.mbr count=1 bs=512
Backup partition setup info
sfdisk -d /dev/sda > backup-sda.sf
To Restore, just do the complete opposite (no count,bs)
dd if=backup-sda.mbr of=/dev/sda
Restore partitions just as simple (no -d)
sfdisk /dev/sda < backup-sda.sf