i lost /etc directory from my server. How can i restore my system?
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 ??
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.
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).
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
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).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.