You can find this useful information from the manpage for gpart.
The gpart may be of some help when the primary partition table was lost or destroyed but it can under no circumstances replace proper disk/partition table backups. To save the master boot record (MBR) including the primary partition table to a file type
dd if=/dev/hda of=mbr bs=512 count=1
Exchanging /dev/hda with the block device name of the disk in question. This should be done for all disks in the system. To restore the primary partition table without overwriting the MBR type
dd if=mbr of=/dev/hda bs=1 count=64 skip=446 seek=446
Warning: make sure that all parameters are typed as shown and that the disk device is correct. Failing to do so may result in severe filesystem corruption. The saved file should be stored in a safe place like a floppy disk.