LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-01-2013, 03:41 PM   #1
rolly4444
Member
 
Registered: Sep 2012
Posts: 46

Rep: Reputation: Disabled
i lost /etc directory from my server. How can i restore my system?


I've 2 identical itanium servers in my network which run rhel 4.8.
i lost /etc directory in one of them in somehow; and i cant run this server again.
will that server be OK if i get /etc from the other server and but it in the dead one, or it will be worst ??
 
Old 10-01-2013, 03:56 PM   #2
cbtshare
Member
 
Registered: Jul 2009
Posts: 619

Rep: Reputation: 42
the best and easiest way is from a backup ...if not you have to re-install
 
Old 10-01-2013, 04:13 PM   #3
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian
Posts: 2,190

Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
There is stuff in /etc that is unique to a server (static IP addresses and things like that), so you can't just copy /etc from a different computer, even a supposedly "identical" one, and have things work perfectly. Another example: You might have the same users on the two servers, but their user numbers would be different in /etc/passwd (this would depend on how you created those userids in the first place). If you are lucky, you could possibly copy /etc, edit a few files, and get it to work. Finding what might need to be edited would be a nightmare I would predict. But in general, what you are proposing is a very bad idea. These servers would really have to be "identical" for what you propose to have a ghost of a chance of working, even with some manual file editing. Was one server cloned from the other, and neither was ever subsequently administered seperately? If that's not the case, I would abandon your plan quickly.

Linux is pretty resilient when it comes to picking up an entire Linux installation and copying it to another computer. But the key is "entire Linux installation". Not just /etc all by itself.

How did you lose /etc? If it was due to hardware disk problems then your whole system is probably trashed anyway. If you accidently did something like "sudo rm -rf /etc" then I am at a loss for words.
 
Old 10-01-2013, 04:19 PM   #4
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,702

Rep: Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270
Quote:
Originally Posted by rolly4444 View Post
I've 2 identical itanium servers in my network which run rhel 4.8.
i lost /etc directory in one of them in somehow; and i cant run this server again.
will that server be OK if i get /etc from the other server and but it in the dead one, or it will be worst ??
You can get most of what you need that way.

For the rest, you have to set the systems IP number appropriately, hostname, /etc/fstab, /etc/exports (if NFS server); delete the ssh keys so that it will be regenerated when you restart the service. If the host was an apache server you will have to check the configurations (sometimes IP numbers/host names are embedded).

If you had a configuration backup (as in a notebook) you would have a much easier time of rebuilding.

And in the future, keep a system backup, and system notebook for all configurations that apply to the specific system. Include any special procedures used (including the one for this recovery).

Last edited by jpollard; 10-01-2013 at 04:22 PM.
 
Old 10-01-2013, 06:48 PM   #5
rolly4444
Member
 
Registered: Sep 2012
Posts: 46

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by haertig View Post

Linux is pretty resilient when it comes to picking up an entire Linux installation and copying it to another computer. But the key is "entire Linux installation". Not just /etc all by itself.

How did you lose /etc? If it was due to hardware disk problems then your whole system is probably trashed anyway. If you accidently did something like "sudo rm -rf /etc" then I am at a loss for words.
i really dont know exactly what happened to it but i think someone may cause this problem inadvertently
 
Old 10-01-2013, 06:50 PM   #6
rolly4444
Member
 
Registered: Sep 2012
Posts: 46

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jpollard View Post
You can get most of what you need that way.

For the rest, you have to set the systems IP number appropriately, hostname, /etc/fstab, /etc/exports (if NFS server); delete the ssh keys so that it will be regenerated when you restart the service. If the host was an apache server you will have to check the configurations (sometimes IP numbers/host names are embedded).

If you had a configuration backup (as in a notebook) you would have a much easier time of rebuilding.

And in the future, keep a system backup, and system notebook for all configurations that apply to the specific system. Include any special procedures used (including the one for this recovery).
thank you so much ithink your post so helpful
 
  


Reply


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
iptables-restore ubuntu server does not restore at boot R03L Ubuntu 4 02-09-2010 08:14 PM
backup the RHEL5 server with Cpanel and create full system restore disk zaki Linux - Newbie 1 08-31-2009 11:59 AM
I need to restore my system so that X server works again, but how? Iltbreg Fedora 3 03-11-2008 01:45 PM
Lost mouse -- how to restore? LePenguine Linux - Hardware 3 03-10-2006 11:29 PM
Help, server hacked!!! how do i restore system binaries? abefroman Linux - Software 3 03-24-2004 05:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:14 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration