[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: backing up a complete linux system



On 16 Feb 2001, Krzys Majewski wrote:

> > tar -cvzf hda2.tar.gz /
> > ( I don't need to add this ... --exclude hda2.tar.gz do I ??) 
> 
> Yeah you probably do. You might want to exclude other stuff to, like
> /proc, /mnt, /tmp, and possibly /dev.  Normally device files are
> created with /dev/MAKEDEV.

With recent GNU tar you don't need to exclude the tarfile explicitly.  
Other versions of tar you sometimes do.

The simplest thing to do is to simply make individual backups of each
filesystem (the l option).  This way you can take backups frequently of
filesystems that change a lot (/home), less frequently for those that
don't change much (/usr) and never for others (/tmp, /proc)

> > anyway... the part where I'm stuck... 
> > I have no idea how to restore this tarred file on to a totally new
> > drive....

You just untar it.  Make sure that the filesystems are large enough for
containing the data, and untar it.  You can make of course a whole
filesystem tree under /mnt (or wherever).

> I'd probably first leave the two drives where they are, reboot to the
> LILO prompt, pass a kernel parameter like "root=/dev/hdc2", and see if
> the new filesystem does the right thing (ie boots). I've never

It should.  However, there are a few caveats.  Some systems can't boot off
of hdc or hdd and require the kernel to be on hda or hdb.  Other systems
can boot hdc/hdd but can't do LBA on them, meaning the kernel has to be on
the first 500MB of the disk.  This refers only to the location of the
kernel, the root filesystem can be anywhere.

Note that you'll have to change your /etc/fstab to reflect the new layout.



Reply to: