Sign up to Submit Content

Sign Up / Login
debiantutorials.org accepts no advertising. Quit asking me.
feed image
Guests 28
If you can walk and chew gum at the same time, you can run Linux

debian tutorials | debian support forum
I invite anyone familiar with Linux or Debian to register here at debiantutorials.org and write tutorials or related articles in order that everyone in the community can benefit. I'm talking to you. You say it better than I do. Your ideas just flow like water. There's so much more that needs to be written in ways that your cousin or an office manager can benefit from. Consider it.
debiantutorials.org is built on and runs on Debian.
Creative Commons License
Installing Debian Sarge, net install, no DHCP
Backing up your partitions with Partimage PDF Print E-mail
Written by machiner   
Sunday, 08 May 2005 06:43

Another terrific utility on the System Rescue Disc is Partimage. Sure, you can use this utility from within your OS, but we like to boot to it as it's much better to backup your partitions this way. This is a quick graphical tutorial walking you through the backup process utilizing Partimage. We'll need to boot to the System Rescue Disc. [ See Getting into BIOS ]

Following the boot, when first prompted, type the following:

menu

Next, arrow right, then down 3 and choose System Rescue. Let the disc boot. For images see Tutorial: Create Partitions.

When the disc has booted you will be here:

Pictures are multi-use, ignore the run_qtparted command.

Don't type partimage yet. You need to make and mount a partition to hold your backup. You can find information about different back up locations and other commands using partimage at the Partimage Forum [EDIT: The forum and Partimage website is now locked]. For this exercise we are backing up your pristine new Debian installaction. You installed it and probably added some new programs. You have set your 'computer up just the way you like and it's working wonderfully. Terrific. Let's keep it that way and allow for experimentation. Hence the backup.

At the prompt let's make a directory for you to mount. Type the following command:

% mkdir /mnt/space

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



Add this page to your favorite Social Bookmarking websites
Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! StumbleUpon! Yahoo! Free Joomla PHP extensions, software, information and tutorials.
Comments
Add New RSS
+/-
Write comment
Name:
Email:
 
Website:
Title:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
 
:angry::0:confused::cheer:B):evil::silly:
:dry::lol::kiss::D:pinch::(:shock:
:X:side::):P:unsure::woohoo::huh:
:whistle:;):s:!::?::idea::arrow:
 
Please input the anti-spam code that you can read in the image.
'Guest'  - restore issue...   |71.162.78.xxx |2007-09-23 17:05:48
hi...
i tried this...
but when i go to reboot after restoration, i get a black screen with:

GRUB _


in the top left...

i rebooted with systemrescuecd looked in the grub devices.map and the harddisc was
pointing to my disc /dev/sda...
ive tried getting aroud this for the past two days...
ive looked around
online to no avail...
can any one help me?

thanks...

[EDIT]: - we like href="http://www.debiantutorials.org/talkitup/ index.php?topic=1644.0"> more info, and a nice chat
about Grub.

3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

Last Updated on Thursday, 18 December 2008 01:19