You can use sfdisksfdisk for this task.
sfdisk -d /dev/sda > part_table
sfdisk /dev/sda < part_table
For GPT partition tables, this requires
sfdisk from util-linux 2.26 or later. It was re-written from scratch on top of libfdisk.
This copies the UUIDs unchanged, rather than generating new ones. So the new disk is a clone of the original, not just another disk with the same layout. Note that Linux's
/dev/disk/by-uuid/ looks at filesystem UUIDs, though, not UUIDs in the partition table.
sfdisk will generate new UUIDs if you edit out the UUIDs from the dump (per-partition and the UUID for the partition table itself near the start of the file).