Now we'll mount that space. Type the following command to accomplish this:
% mount -t ext3 /dev/hda2 /mnt/space
We are mounting your /home directory because I know you have it (if you've followed my tutorial to create partitions. If you're running Linux now you have it, too). If you have another partition, say on another drive, that you wish to use as a backup drive, by all means, mount that one instead. If you are running windows now this tutorial is not for you. Sorry. That's next week.
Now we're ready so at the prompt type:
% partimage
The following thumbnails will show you what the program looks like:
Simply arrow down to the partition you wish to backup, in this case leave it on the first highlighted entry - your hda1 partition. Tab to the location bar and type the following into it:
/mnt/space/backup (or call it whatever you like. I use item+date, eg: debian-07-05-05)
Then F5 to the next screen. Screen 2 you can leave alone, or poke around and change settings, it's up to you. F5 again to write a description of your image, and finally F5 to start the process. It will take a moment to initialize, but soon enough it will start and about 4 minutes later you will be back at the original prompt. The task is complete. You have backed up your entire /dev/hda1 partition (your debian system with all of your system files, etc.).
Partimage is terrific (well for many reasons, but this is my favorite...) because it will only backup actual used space and compress the backup image to your choice of compression. Example, my "/" partition (hda1) is 10GB but my install only uses 3GB. Partimage only backs up the 3GB actually used and compressed my image to around 1GB. That's cool.
Restoring is just as simple except that you will choose to "restore" back to the partition that you backed up. Simple, fast, effective backup solution for your Linux operating system. You can restore your backup image to any partition you like as long as it's the same size or larger than the original partition you backed up. Actually used space does not count. If your partition was 10.2GB (ignoring the compressed size and actual size of files backed up) then you need to restore your image to a like sized partition.
I swapped hard drives the other day and restored my /dev/hda2 to my /dev/hdb1, which was actually now becoming /dev/hda1. Schweet! I love when a plan comes together.
This method will work to backup your windows install as well but support for NTFS is experimental. However, I've done it many times with no errors. You just need to make sure that your Windows partition is fully de-fragmented.
To find or see your partition table open a terminal and become root. Type the following command:
# fdisk -l
You'll see something like this:
computer-name:/# fdisk -l
Disk /dev/hda: 80.0 GB, 80026361856 bytes
16 heads, 63 sectors/track, 155061 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 21887 11031016+ 83 Linux
/dev/hda2 21888 153666 66416616 83 Linux
/dev/hda3 153667 155060 702576 82 Linux swap / Solaris
Disk /dev/hdb: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 7121 57199401 83 Linux
/dev/hdb2 7122 7297 1413720 5 Extended
/dev/hdb5 7122 7297 1413688+ 82 Linux swap / Solaris
machiner 8 may 05