Re: backup of disk image to tape but i need some flexiblity when restoring !
From: Vilmos Soti (vilmos_at_vilmos.org)
Date: 02/23/04
- Next message: Ed Murphy: "Re: VMware's use of /tmp"
- Previous message: relic: "Re: large binary immediately SEGV's"
- In reply to: Tom Van Overbeke: "backup of disk image to tape but i need some flexiblity when restoring !"
- Next in thread: Nick Landsberg: "Re: backup of disk image to tape but i need some flexiblity when restoring !"
- Reply: Nick Landsberg: "Re: backup of disk image to tape but i need some flexiblity when restoring !"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 23 Feb 2004 09:07:43 -0800
"Tom Van Overbeke" <tom.van.overbeke@pandora.be> writes:
> I have a few linux servers that i want to be able to restore in no time, so
> i was thinking of dumping the entire disk contents to tape using dd.
> sth. like dd if=/dev/sda of=/dev/st0.
Don't do it. First, it seems that /dev/sda hosts your root
partition. How long it would take to backup /dev/sda? Will
anything change during that time? You will have a corrupt
backup. If a file is changed, that's one thing. But the
filesystem metadata will also change, so your backup will be
problematic. You should use dd to copy a partition/disk only
if the partition is either not mounted or is mounted readonly.
Second, this thing will also backup unused space. Say, you had
a 300MB gzipped file a while ago but you already deleted. Then
dd, since it doesn't work on the filesystem level, will also
backup the still existing blocks of this long gone file. It will
inflate your backup, and it is also hard to compress. Third, if
your disk has surface errors, then that can also cause problems.
All in all, this is not a good way to backup your data.
> the problem with this is: what if the disk to be restored on is different
> in size.
>
> Can i expect that if the disk is bigger, the restore would work without a
> problem ?
No.
> The problem being that the servers are serviced by the manufacturer itself,
> and who nows if they decide a year from now to only provide disks of 72GB
> instead of currerntly 36GB. Would my 'dd' backup still be of any use ?
This is one reason why at work we don't want manufacturers to service our
machines... We buy the parts, we build it, and we are totally in control.
> other question, could i restore these tape contents to an image file, and
> mount this image file as a virtual disk ?
No, since you backup a whole disk and not a partition. You can mount
a partition image, but not a disk image (unless you make some real
messing around like extracting the partitions from the image).
Also, since you backed up a life rw filesystem, there *WILL BE*
errors on the backup. And some will be filesystem metadata which
means the whole image is unreliable. You might be able to mount it,
but it won't be what you are looking for. It will have some hidden
errors which will come back and haunt you in the long run.
> lastly,
> are there other problems or better approaches for what i am trying to do ?
If you are not easy writing your own backup solution
(and maintaining it), then consider buying a commercial backup
solution which handles these problems. Of course, there are
also free solutions. I don't know any of such since I wrote
our own backup program (perl and uses tar) to handle our needs.
> how do i get the entire disk contents to fit on one tape. is it safe
> to pipe the data through gzip before writing them to tape ?
If the tape does its own compression, then you don't have to worry
about compressing. But you might need to enable it. If it is not,
then you can run it through gzip. However, bzip2 would be a better
choice since it compresses better, and if for some reason the tape
becomes corrupted (i.e. one or two blocks become unreadable or
corrupt) you still can recover things behind it.
Vilmos
- Next message: Ed Murphy: "Re: VMware's use of /tmp"
- Previous message: relic: "Re: large binary immediately SEGV's"
- In reply to: Tom Van Overbeke: "backup of disk image to tape but i need some flexiblity when restoring !"
- Next in thread: Nick Landsberg: "Re: backup of disk image to tape but i need some flexiblity when restoring !"
- Reply: Nick Landsberg: "Re: backup of disk image to tape but i need some flexiblity when restoring !"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|