How to manage partition tables with sfdisk

Test whether partitions seem correct:

sfdisk -V /dev/sda

Copy the entire partition table from one disk to another:

sfdisk -d /dev/sda | sfdisk /dev/sdb

Dump the partitions of a device in a format useful as input to sfdisk:

sfdisk -d /dev/sda > partition.table.dump

Write a devices partition table from file:

sfdisk /dev/sdb < partition.table.dump