Backup and restore MBR partitions

To backup partitions from a disk use the sfdisk command. This command will output the partitions structure and size within a file

[root@localhost /]# sfdisk -d /dev/sd
sda sda1 sda2 sda3 sdb
[root@localhost /]# sfdisk -d /dev/sda > sda-backup.txt

Backup MBR partitions

Backup MBR partitions

You can keep this file saved in another location to ensure that it will not be lost. If your partitioning system has issues, you can use the backup file to restore the disk partitions, as follows:

[root@localhost /]# sfdisk -f /dev/sda < sda-backup.txt 



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s