next up previous contents
Next: Backing up the contents Up: System software Previous: Graphical Partition Tools   Contents

Backing up your partition table

sfdisk is a tiny program that allows you to save your partition table. If you delete a partition accidently, you can try to restore the table. The backup is done into a file. Of course, you must keep this file on a removeable media (such as a floppy disk), or on another computer. If your hard disk is damaged, you won't be able to read the backup from the disk itself !

This command allows you to backup the full partition table of your disk HDA: "sfdisk -d /dev/hda > bak-hda" Now, this command allows you to restore from the file: "sfdisk /dev/hda < bak-hda". Of course, this command is very dangerous, because it overwrites the existing partition table !!! Before restoring, you should back up the current version, even if it seems to be damaged. This would allow you to undo the restoration.



2004-08-17