- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- If I delete the files /etc by accident. How could ...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2004 11:33 PM
08-18-2004 11:33 PM
If I delete the files /etc by accident. How could I restore them back?
make_recovery can help?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2004 11:49 PM
08-18-2004 11:49 PM
Re: If I delete the files /etc by accident. How could I restore them back?
Best solution would be to use frecover / makre_tape_recovery, but for sure you would need a reovery CD to start the server.
Even booting in LVM mode will be problematic.
Best way is to avoid this situation: for example, creare an alias where rm='rm -i', so that you are always prompted with confirmation BEFORE the damage.
If it happens.... it's too late.
HTH,
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2004 11:57 PM
08-18-2004 11:57 PM
Re: If I delete the files /etc by accident. How could I restore them back?
How about make_tape_recovery?
I used to do make_tape_recovery but I don't know if it cna help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2004 11:58 PM
08-18-2004 11:58 PM
Re: If I delete the files /etc by accident. How could I restore them back?
if you have make_recovery tape you can restore
/etc by:
mt -f /dev/rmt/0mn rewind
mt -f /dev/rmt/0mn fsf 1
tar xvf /dev/rmt/0m etc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2004 12:02 AM
08-19-2004 12:02 AM
Re: If I delete the files /etc by accident. How could I restore them back?
What does "mt -f /dev/rmt/0mn fsf 1" do?
Thanks a lot, You could save my life.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2004 12:05 AM
08-19-2004 12:05 AM
Re: If I delete the files /etc by accident. How could I restore them back?
yes, it can help.
From "man make_recovery" (older version)
To extract a single file from the recovery archive:
mt -t /dev/rmt/0mn fsf 1
tar -xvf /dev/rmt/0m filename
Extracting files from tape can take a long time, especially when
archives are large.
HTH,
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2004 12:16 AM
08-19-2004 12:16 AM
Re: If I delete the files /etc by accident. How could I restore them back?
mt -f /dev/rmt/0mn fsf 1
- tape is positioned on the beginning sied of the 1-file
first file 0 - it is LIF header
second file 1 - it is file containing archived files by make_recovery
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2004 12:16 AM
08-19-2004 12:16 AM
Re: If I delete the files /etc by accident. How could I restore them back?
In doing so, you will at least have an /etc/passwd as well as all other critical files that otherwise without them would render the system unbootable in multiuser.
Next restore any system specifc files from a backup, such as passwd, nsswitch.conf, resolv.conf (any custom *.conf file), inittab, fstab, etc.