"Mike Egglestone" <[EMAIL PROTECTED]> writes: > Hi all..... > I trying to do a backup of my system and I think I might have the > backup part right....correct me if I'm wrong.... > I could use this command.... > > 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. I back up my machine to 4 100MB ZIP disks, using tar via a script that sets up all the options, prompts for the disks, etc. I can mail you the script if you want. I don't back up everything either. For example, the only thing under /usr that gets backed up is /usr/local. The theory being that I can re-create the debian stuff with the appropriate apt-get commands, given the stuff in /var/cache/apt and so on. I've never had to restore the whole system though, so there might be some bugs to iron out ;) > anyway... the part where I'm stuck... > I have no idea how to restore this tarred file on to a totally new > drive.... > my guess..... > add the other drive.... partition similar to hda (swap and such) > mount the partition.... say......mount /dev/hdc2 /mnt > then untar the file hda2.tar.gz into /mnt...... > now I should have 2 file systems ... one at "/" > and the other at "/mnt" > so what do I do now? > Just put the hdc drive in place of the hda drive... redo lilo and > presto? 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 replaced a drive, but you might run into problems e.g. if the new drive is a lot bigger and LILO gets confused, in which case you might have to read the LILO docs and/or upgrade your LILO. -chris