Linux server MBR backup....
Linux server MBR backup
Always take a backup of hard disk partition table that is MBR on your server.
You can use following commands to take a backup for your disk partition table.
First to find out the device name on the server, you can use following command
=================================
[root@checkme ~]# fdisk -l
=================================
If the output contents /dev/sda, then the device name you are suppose to use is /dev/sda in the following commands.
If the output is /dev/hda, then replace device name with /dev/hda.
dd command is very useful while taking backup.
=================================
[root@checkme ~]# dd if=/dev/sdX of=/tmp/sda-mbr.bin bs=512 count=1
==================================
To restore it back on the server, use following command
================================
[root@checkme ~]# dd if= sda-mbr.bin of=/dev/sdX bs=1 count=64 skip=446 seek=446
================================
|