LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How to backup a linux redhat install across a network? (https://www.linuxquestions.org/questions/linux-networking-3/how-to-backup-a-linux-redhat-install-across-a-network-58041/)

cmisip 05-04-2003 01:29 AM

How to backup a linux redhat install across a network?
 
I have configured an old 486 dx2 66 Mhz machine with 8 mb ram and 400 mb hd as an smtp server. I would like to backup this install across a network ( I dont have another local hard disk or any cd r drives in this machine. I have an empty ext2 partition exported via nfs on another machine which the 486 can access. I have read that dump can do a full system backup. I am thinking of using it to backup the 486 machine linux install onto the other machine's exported ext2 partition. What parameters to dump do I need to do this network backup? If this is even successful and I am able to create a full system backup file on the other networked machine, how would i restore in the case of a crash on the 486. Somehow I would need to have a boot disk with a kernel with the natsemi module so I will be able to access the network directory where I stored the backup. I guess it also needs to have the dump prgram. My second question is then how do I create this boot disk.
If there is no way to create such a boot disk with a natsemi module, would a mini linux system like's Toms rtbt allow me to restore from a dump file backup saved on cdrom? I would have to open the 486 and temporarily attach a cdrom drive (which I used to install the redhat 5.2 linux system). Thanks

nakkaya 05-04-2003 02:32 AM

have look at http://www.partimage.org/index.php3 part image

cmisip 05-04-2003 03:02 PM

I tried that but it just hangs. I think I dont have enough memory to run even the binary. I was able to do a dump last night from the 486 to my nfs server(amdxp2400). I did a level 0. Was also able to creat a boot disk for the 486. Now I am trying to figure out how I would go about restoring in the event of a crash. Somehow I must have a minimal linux distro running via a boot disk with the drivers for my netgear fa312 loaded and be able to mount an nfs directory from the server and do a restore. I have taken the following steps:
1) mkbootdisk
2) boot with the created boot disk. When prompted for the root disk, Insert the redhat 5.2 rescue disk.
(This resulted in the loading of a kernel image with my network drivers and a minimal bash terminal.)
3) ifconfig eth0 192.168.1.3 netmask 255.255.255.0 broadcast 192.168.1.255 up
4) route add -net 192.168.1.0 eth0
5) route add default gw 192.168.1.1 (I dont know if this is necessary)
6) I can now ping the other machines.
7) create a mount point for the remote nfs directory holding the dump backup file
8) Now I try to mount a remote nfs directory with:
mount -t nfs 192.168.1.2:/mnt/ext2temp /mnt/backup

I get greeted with the error fs type nfs not supported by kernel.
Anybody have any ideas what I should do next?

BigNate 05-04-2003 03:57 PM

Well in a pinch I would use scp

see
man ssh
man sshd
man scp

$scp -r <localdir/to/filelocation> <user@host:/dir/for/file>

david_ross 05-04-2003 04:03 PM

Quote:

Originally posted by BigNate
Well in a pinch I would use scp

see
man ssh
man sshd
man scp

$scp -r <localdir/to/filelocation> <user@host:/dir/for/file>

Or use rsync over ssh.

It's a pity partimage doesn't work that would have been the best way.

You could also mount a networked folder and dd to an image file.

mlp68 05-04-2003 06:02 PM

Quote:

1) mkbootdisk
2) boot with the created boot disk. When prompted for the root disk, Insert the redhat 5.2 rescue disk.
(This resulted in the loading of a kernel image with my network drivers and a minimal bash terminal.)
3) ifconfig eth0 192.168.1.3 netmask 255.255.255.0 broadcast 192.168.1.255 up
4) route add -net 192.168.1.0 eth0
5) route add default gw 192.168.1.1 (I dont know if this is necessary)
6) I can now ping the other machines.
7) create a mount point for the remote nfs directory holding the dump backup file
8) Now I try to mount a remote nfs directory with:
mount -t nfs 192.168.1.2:/mnt/ext2temp /mnt/backup
I use a rescue CD at
http://www.phenix.bnl.gov/~purschke/RescueCD/
that supports all the NFS stuff. I use this to make clones of a carefully put-together system on many machines. You can customize it easily.

There are many ways of doing this, but I make straight tarballs of all partitions in questions. Say /dev/hda1 is your /, then boot that CD,

< mount your NFS area on, say, /backup >
mount /dev/hda1 /bdisk
cd /bdisk
tar c . | gzip -9c > /backup/root.tar.gz

ditto for the other partitions.

If you have to restore, make matching partitions on the new drive, and restore the tarballs. In the end, mount the new root partition as, say, /bdisk and do
lilo -r /bdisk

and you are done.

Hope it helps,
M

cmisip 05-07-2003 09:25 PM

Thanks. I think the method of creating custom boot disk and cd is what I need. When I use redhat rescue disk, I cannot mount my cdrom or nfs ( both iso9660 and nfs fs not supported). When I use toms mini linux on a floppy, I can mount the cdrom but I dont have the restore command. I also cannot boot off a cd. I guess I will need a combination of both floppy boot and cdrom access/nfs access to access my backup. Unfortunately, meanwhile my server crashed. Might have been hacked, I dont know. I killed the qmail program but it was still behaving like all its memory was hard disk based. Shouldn't have opened http port. But I went into this project not having a clear way of saving my work. It was a fun and very good learning experience. I will recreate everything after I come back from a vacation. Thanks again for everybody's input.


All times are GMT -5. The time now is 08:24 PM.