LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 05-12-2008, 02:05 AM   #1
rrbalajikmu
LQ Newbie
 
Registered: Apr 2006
Posts: 3

Rep: Reputation: 0
Reinstall RHEL4 without losing data


Hi all,

How to reinstall the RHEL 4 without losing the data.

Regards
R.B
 
Old 05-12-2008, 10:11 PM   #2
rlhartmann
Member
 
Registered: Mar 2008
Posts: 73

Rep: Reputation: 16
Any time your re-installing, it's possible to make a mistake and lose everything, therefore I recommend backing up all critical data to a USB drive or some other external device. Large external USB's are cheap and can be completely disconnected during the reinstallation.
If you don't have one, ask a friend to borrow theirs.


The main directories that you need to backup are /etc, /root, /home, and possibly
/var or at least parts of /var, and maybe /boot. There are several programs that you can use to backup the system. Since you said you are going to reinstall anyhow, I suggest
using tar, you could use a for loop like this:

mkdir /usb
mount -t vfat /dev/sda1 /usb # Mount the external drive (assuming FAT filesystem)
# Run this loop from / (the root directory)
for DIR in root etc home var boot
do
tar -czvf /usb/${DIR}.tgz ${DIR}
done
umount /usb # Unmount the external drive when done

Backing it all up
You may want to backup the entire drive using tar -czvf /usb/everything.tgz /
or look into the dump command. However, even if you back it all up,
I recommend at least having a these smaller tarfiles for easy access to important
files later.

To extract, use tar -xzvf root.tgz etc.
Note, do not restore the etc, boot, and var directories overtop the new install,
extract them into a separate directory, and only copy files as needed.

Partitioning drives
Note, I don't know how many partitions you separated your disk into
during your original install, but I highly recommend creating at
least two partitions during your reinstall. Create a root (/) partition,
and a home (/home) partition, then if you want to re-install or upgrade,
you can reformat / without losing any files in /home. Having
separate /var, /usr, /boot, and /tmp filesystems also have several benefits.
 
Old 05-12-2008, 11:06 PM   #3
rrbalajikmu
LQ Newbie
 
Registered: Apr 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Hi,


Is It not possible to reinstall without taking backup. I think is there. Please guide me.

Regards
R.B
 
Old 05-13-2008, 05:54 PM   #4
rlhartmann
Member
 
Registered: Mar 2008
Posts: 73

Rep: Reputation: 16
When you start an install, it will look for an existing linux partition, it should then give you an option
to upgrade. If your using the exact same version, it should just re-install over it. Other posts might have more experience with this.
 
  


Reply

Tags
reinstall, rhel4


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
network bonding problem in RHEL4 x64 ( packets losing ) Jerais Red Hat 3 05-25-2007 05:55 PM
How can boot reinstall ubunto without losing all my database? sidneylab Linux - Newbie 1 03-26-2006 06:46 AM
Repartitionning without losing data mimithebrain Linux - General 6 10-22-2005 04:38 PM
reinstall windows without losing linux ereeno Linux - Software 30 09-04-2003 03:55 AM
keep losing data from /usr bdp Linux - General 4 07-06-2002 02:21 AM


All times are GMT -5. The time now is 10:20 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration