Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Image backup in Linux

2 views
Skip to first unread message

JayLinux53

unread,
Jan 31, 2009, 7:46:19 AM1/31/09
to
I am a new Linux user (about 3-4 months) & have a dual-boot setup on
desktop PC (single-user), with Windows XP and openSUSE 11.1 Linux,
both on separate HD's. GRUB is the default boot manager for the PC and
is installed in the MBR of the first HD (i.e. Windows HD).

For Windows partition (C:/ -- the system partition), I use Norton
Ghost 2003 from a DOS boot disk (CD) to make an image backup to
another HD partition on same PC, periodically. Also, use the 'ERUNT'
program that makes an auto-backup of the registry each time Windows is
booted into. This strategy has worked well for Windows.

For Linux, does anyone have experience using image backup software ?

Jay
==

Bryce

unread,
Jan 31, 2009, 9:20:50 AM1/31/09
to
JayLinux53 wrote:

I suppose Ghost would work on a Linux partition as well as it does on
Windows, so that's one option. Partimage is a Linux application that
also makes/restores images. You can use partimage directly or try
something like Clonezilla that uses partimage.

Mark Hobley

unread,
Jan 31, 2009, 10:08:09 AM1/31/09
to
JayLinux53 <jayli...@gmail.com> wrote:
> For Linux, does anyone have experience using image backup software ?

I have used partimage a couple of times. The resultant image files can
be split into multiple files for storage on removable media.

http://www.partimage.org/

Mark.

--
Mark Hobley
Linux User: #370818 http://markhobley.yi.org/

ray

unread,
Jan 31, 2009, 11:17:03 AM1/31/09
to

I have used partimage to backup a partition so I could put in a new disk
and duplicate it. Works quite well - will do compressed images, will back
to another computer on you LAN if you so desire.

Consider this: the only time I've used a utility like this is when I
changed disks. Normally I back up data I would hate to loose - don't
really see any point in backing up the OS - it's trivial to do another
install.

Joost van der Waa

unread,
Jan 31, 2009, 1:37:53 PM1/31/09
to
I have been using Ping, which is linux based and runs from a CD:
http://ping.windowsdream.com/
It has saved me a lot of problems and is rather easy to use.

Joost

Van Chocstraw

unread,
Jan 31, 2009, 3:23:40 PM1/31/09
to

I just back up my data files and any mp3's or Jpeg's I want to keep to a
USB drive. Everything else is already backed up on the install disks. I
find that there are so many updates and upgrades all the time that there
is no point in backing up the whole system. It's just as fast to do a
clean install as it is to fool around with backups and restores.


--
<<//--------------------\\>>
Van Chocstraw
>>\\--------------------//<<

notbob

unread,
Jan 31, 2009, 3:59:33 PM1/31/09
to
On 2009-01-31, Joost van der Waa <Joost.va...@whipethishccnet.nl.invalid> wrote:

> I have been using Ping, which is linux based and runs from a CD:
> http://ping.windowsdream.com/

From the PING website:

"The FREE download of PING necessitates an authentication. Please, indicate
here the email address that you've registered on this site."

Horsecrap!

nb

The Natural Philosopher

unread,
Jan 31, 2009, 4:20:12 PM1/31/09
to
I just mirror the ruddy lot onto a second disk every night with rdiff.

If the primary disk goes, new disk, install base system, and roll it all
back, and reboot.

Mike

unread,
Jan 31, 2009, 8:45:27 PM1/31/09
to
Something that you can use to make an image backup of any disk, no
matter what operating system is on it.

Boot the Linux install CD/DVD into Rescue mode
Log in as root
attach a USB disk
mount the USB disk: mount /dev/sdb1 /mnt
(assumes some reasonable file system on the USB disk)
make an image copy
dd if=/dev/sda bs=256k | gzip -c > /mnt/name-of-backup.gz
Depending on what kind of disk your system has the names (sda, sdb1,
etc) may change.
USB disks are a little slow, so I let it run overnight.

To restore, same process then
gzip -c /mnt/name-of-backup.gz | dd of=/dev/sda bs=256k

Also handy for migrating systems...

Message has been deleted

Joost van der Waa

unread,
Feb 1, 2009, 7:35:39 AM2/1/09
to
This might be handy, but if you don't have the knowledge of all these
commands, it will be very frustrating....
Joost

Tim Greer

unread,
Feb 1, 2009, 1:03:19 PM2/1/09
to
JayLinux53 wrote:

You can mirror it with rsync, cp, dd, etc., depending on what you need
(and do error checking/cmp in the process and/or after the mirror to
check that it was successful). You shouldn't need any third party
tool, but I suppose that depends if you want to mirror the Windows data
in any specific way, so I'm just speaking of Linux.
--
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting. 24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!

bb

unread,
Feb 2, 2009, 4:16:06 AM2/2/09
to

Why not use partimage that allow you to save unmounted partitions and
exclude free blocks?

The save of a live disk can be very corrupted, since it take time
to travel from the first to the last block and the superblock information
is in memory, and some file may have allocated new blocks while you do it.

If one use dd to copy a device it should be unmounted, or at least mounted
read only.
And before compressing it, one should write zeroes to all free blocks so
the compressed image is minimal.
If the filesystem allow large files, just do
dd=if=/dev/zero of=largefile || rm largefile
eg. copy /dev/zero to a file until the disk is full and dd exit with an error,
and delete the file.
Now the image is much smaller then compressing also old unused data blocks with
random binary data.

/bb

Mark Hobley

unread,
Feb 2, 2009, 6:08:10 AM2/2/09
to
Mike <mi...@hammocktree.us> wrote:
> make an image copy
> dd if=/dev/sda bs=256k | gzip -c > /mnt/name-of-backup.gz

> Also handy for migrating systems...

It is not mentioned in most Unix books that I have seen, but if your
target partition is bigger than the original partition, you do not gain
any free space after the data dumper is used. It is necessary to run
resize2fs on the target partition after the dump, to utilize the
additional space within the bigger partition.

Some people say that dd is not the right tool for this job, although Unix
books tell us to use this.

Eric Raymond refers to dd as "deprecated"
http://www.catb.org/jargon/html/D/dd.html

Regards,

Nikos Chantziaras

unread,
Feb 2, 2009, 6:11:14 AM2/2/09
to
Mark Hobley wrote:
> Mike <mi...@hammocktree.us> wrote:
>> make an image copy
>> dd if=/dev/sda bs=256k | gzip -c > /mnt/name-of-backup.gz
>
>> Also handy for migrating systems...
>
> It is not mentioned in most Unix books that I have seen, but if your
> target partition is bigger than the original partition, you do not gain
> any free space after the data dumper is used. It is necessary to run
> resize2fs on the target partition after the dump, to utilize the
> additional space within the bigger partition.
>
> Some people say that dd is not the right tool for this job, although Unix
> books tell us to use this.
>
> Eric Raymond refers to dd as "deprecated"
> http://www.catb.org/jargon/html/D/dd.html

It can still be useful. But since the OP mentioned he has Ghost, he can
simply use that one, especially since he knows how to use it.

JayLinux53

unread,
Feb 2, 2009, 7:49:33 AM2/2/09
to

> It can still be useful.  But since the OP mentioned he has Ghost, he can
> simply use that one, especially since he knows how to use it.

I don't think the version of Ghost that I use (NG 2003) can backup
ext3 partitions to image.

The other advantage of Ghost (& disadvantage of partimage) is that,
with Ghost you can browse for & selectively restore directories (with
Ghost Explorer).
partimage does not have this option.

Jay
==

Lars Behrens

unread,
Feb 2, 2009, 8:36:30 AM2/2/09
to
JayLinux53 wrote:

> The other advantage of Ghost (& disadvantage of partimage) is that,
> with Ghost you can browse for & selectively restore directories (with
> Ghost Explorer).
> partimage does not have this option.

IMO, in Linux you usually don't need stuff like that. As you can mount
anything anywhere and you always have data separated from OS stuff, you can
do backups simply by copying directories.

The only useful case for imagers under linux that I can think of is for
backing up the MBR.

--
Cheerz Lars

Mike

unread,
Feb 2, 2009, 8:21:41 PM2/2/09
to
If you boot an install CD/DVD then the system disk (/dev/sda for
example) will not be mounted, so there is no update activity going on.
Writing zeroes is an excellent suggestion and I do that myself, but was
trying to keep the example as simple as possible. I even have a REXX
program on my Windows system that will fill all unallocated space with
zeroes thne erase the file. Using the dd of /dev/zero is much faster
though.

jaylinux53

unread,
Feb 3, 2009, 7:32:24 PM2/3/09
to

>
> The only useful case for imagers under linux that I can think of is for
> backing up the MBR.
>

How can one backup the MBR in Linux ? (I have Windows XP on HD 1 (C:/
partition) and openSUSE 11.1 on HD 2). The bootloader is grub & is
located in the MBR, i.e. grub is used to boot into Windows also.

Eef Hartman

unread,
Feb 4, 2009, 5:51:33 AM2/4/09
to
In alt.os.linux.suse jaylinux53 <jayli...@gmail.com> wrote:
> How can one backup the MBR in Linux ? (I have Windows XP on HD 1 (C:/
> partition) and openSUSE 11.1 on HD 2). The bootloader is grub & is
> located in the MBR, i.e. grub is used to boot into Windows also.

dd if=/dev/sda of=/some/file count=1
For the device, fill in the name of the FULL disk you want the MBR
to be backup'ed FROM (so no numbers after the letter).
If you use /dev/sda1 (or likewise) you'll backup the bootblock of
the PARTITION (where grub could also be located), not the MBR.

Oh, and depending on your group membership you may need to be "root"
to be able to do (if you're in the "disk" group you may read the
MBR without being root, but not WRITE it).
--
*******************************************************************
** Eef Hartman, Delft University of Technology, dept. SSC/ICT **
** e-mail: E.J.M....@tudelft.nl, fax: +31-15-278 7295 **
** snail-mail: P.O. Box 5031, 2600 GA Delft, The Netherlands **
*******************************************************************

Douglas Mayne

unread,
Feb 4, 2009, 10:54:12 AM2/4/09
to
On Sat, 31 Jan 2009 04:46:19 -0800, JayLinux53 wrote:

Backing up is a fundamental skill for network administrators. It
is a big topic- too big for complete coverage in a newsgroup
posting. Consider the following as a very brief introduction to
the topic.

Learning to use some of the tools can pay big dividends. The "dd"
command gives a simple method to obtain raw images. The disadvantage of
using that as your only tool is the large size of the raw data it
produces. Other tools have an advantage because they only require
space for blocks actually in use. That can save a lot of storage space.
For example, it is not uncommon for new workstations to have 250G (or
more) local storage. It quickly becomes difficult (or at least a daunting
prospect) to provide backup storage for raw image backups using that block
size. Terrabytes get consumed quickly, even a small group of network
workstations, if you are constrained to use a 250G block per backup job.
That is why it is better to deal with the space in use, IMO. There are
various tools which are appropriate for backing up. It pay dividends to
learn about how to use them.

Windows Imaging...
The imaging tool that I use for Windows systems is ntfsclone from the
ntfsprog's package. It is an equivalent tool to Ghost, IMO. The backup is
made from GNU/Linux, either booted from a live CD or as a dual-boot setup.
The backup of Windows will be "clean" as long as Windows is shutdown. I
have used this with NT4, W2k, and XP. I don't know about Vista, or with
systems with snapshots. AFAIK, the ntfsclone program works at a simple
level; it knows enough to identify sectors that are in use. Once this is
known, it is simply a matter of generating a representation of those
sector locations and their contents. If the sectors data is compressible,
then the backup images can be reduced. I often use ntfsclone with
compression, and with a network transport to backup to network storage.

# ntfsclone -s -o - /dev/hda1 | gzip | nc -w 2 storage.localnet 1234


Linux Backups...
The fundamental tool for backing up in GNU/Linux are tar and cpio. There
are also filesystem specific tools, such as xfsdump. The backups made with
tar may need to be supplemented with other data for ACLs and EAs.
man getfacl
man getfattr

The advice about making "clean" backups, as mentioned above, is also
valid. It easiest to "get out of the way" by booting a live CD and
performing the backup from that environment where the object being
backed up can be mounted read-only, etc.

Encryption...
Backups can employ encryption where necessary. I recently wrote this:
http://groups.google.com/group/comp.os.linux.misc/msg/7522323b1a1d6fbf

--
Douglas Mayne

Kevin Nathan

unread,
Feb 4, 2009, 11:15:33 AM2/4/09
to
On Wed, 04 Feb 2009 11:51:33 +0100
Eef Hartman <E.J.M....@math.tudelft.nl> wrote:

>In alt.os.linux.suse jaylinux53 <jayli...@gmail.com> wrote:
>> How can one backup the MBR in Linux ? (I have Windows XP on HD 1 (C:/
>> partition) and openSUSE 11.1 on HD 2). The bootloader is grub & is
>> located in the MBR, i.e. grub is used to boot into Windows also.
>
>dd if=/dev/sda of=/some/file count=1

Not quite complete. It should really be:

dd if=/dev/sda of=/some/file bs=446 count=1

so you don't save the partition table and risk over-writing it later
if you save the file back to MBR.


--
Kevin Nathan (Arizona, USA)
Linux Potpourri and a.o.l.s. FAQ -- (temporarily offline)

Open standards. Open source. Open minds.
The command line is the front line.
Linux 2.6.25.20-0.1-pae
9:12am up 11 days 18:44, 24 users, load average: 0.18, 0.28, 0.38

Eef Hartman

unread,
Feb 4, 2009, 11:24:42 AM2/4/09
to
In alt.os.linux.suse Kevin Nathan <kna...@project54.com> wrote:
>>dd if=/dev/sda of=/some/file count=1
>
> Not quite complete. It should really be:
>
> dd if=/dev/sda of=/some/file bs=446 count=1
>
> so you don't save the partition table and risk over-writing it later
> if you save the file back to MBR.

Unless, of course, you DO want to backup the partition table itself
too.

But - a useful addition - let the OP decide what he wants.

0 new messages