LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to backup Linux on RH 9 Im so confused (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-backup-linux-on-rh-9-im-so-confused-250742/)

izac5 11-03-2004 03:23 PM

How to backup Linux on RH 9 Im so confused
 
Hi there I've spent the 2 days trying to install a second hard drive on red hat linux 9.0. Nothing seems to come easy with me when im working with Linux. I'd love to use Disk Druid but thats only available at initial installation. So i've been forced to use fdisk and parter. Intialy i accidently created a software raid. Now it i got one 120 gig ext3 and i have mounted on a folder called /Backup. I still don't understand everything but this is what i would like to do.

I want to create a complete backup/image of the current hard drive so if it dies or gets screwed up we can just restore from the other hard drive or use the hard drive in place of the other one.

How do i do this?

1. Does a straight file copy work?

2. Do i need all partitions including the boot and swap file? I assume you do but am unsure how to replicate those partitions on the new 120 gig hard drive.


Please help.


Thanks:confused:

Demonbane 11-03-2004 06:40 PM

yea in fact straight copy will work, just need to restore the bootloader manually when you restore. You might want to try something like Partimage

izac5 11-04-2004 10:13 AM

What are the steps for restoring the boot loader?
 
Thanks i think im been put on the right track here.What are the steps for restoring the boot loader if the main hard drive fails? And do i need to create 3 seperate partitions (swap,boot and hda1) on the backup drive or just one?

tangle 11-04-2004 12:04 PM

Are you wanting to make an exact copy of the drive or are you just interested in making it so you can recover from an failure?

If you want to make an exact copy, you can use the dd comman.

If you are wanting to back up the config files. You can use tar. For that matter you can use tar to backup the entire drive.

For the boot loader problem, what boot loader are you using? It will be either Lilo or Grub.

izac5 11-04-2004 05:26 PM

We want to protect ourselves from 2 things

1. A hard drive failiure
2. Us screwing up the OS ourselves


So we'd like to do a monthly drive image of the hard drive. Software raid doesnt protect from the second thing. So we need to image it and recreate that image every month.


Thanks.


PS. I formatted and partitioned using FDISK so i could get a ext3 file system. However all the partitioning programs keep on saying a i got a invalid partition table despite been able to add files to the hard drive no problem.

tangle 11-04-2004 06:40 PM

You can use the dd command to copy the data from one hard drive to another. I am no dd expert but I think this will work:

dd if=/dev/hda of=/dev/hdb

I believe that this will copy the first hard(primary master) drive to the second hard(primary slave) drive.

tangle 11-04-2004 07:43 PM

Might want to check out this link.

http://p-two.net/hard-drive/hard-drive.html

izac5 11-10-2004 10:52 AM

Hi there. I tried the DD command and now i got some wierd stuff happening. It gave me a message that the hard drive was fulll even though i was backing up from 40 gig to 120 gig hard drive.

Anyways before I do anything i need to get rid of this error message. I've gone through fstab and mtab and there are no duplicate entries so it has to be something else. Heres the message.

Mounting Local filesystem: Mount: Label=/boot duplicate- not mounted


and i get the same message when mounting "other file system"

Any advice would be quite helpful. Thanks!


All times are GMT -5. The time now is 07:48 AM.