Restore operation after mis-deletion of Linux files

Source: Internet
Author: User
Tags file copy

Testimonials: Ever a knave, accidentally put/usr/bin under all the commands are deleted, fortunately this only a test environment, when in operation, a bit deft on hand make mistakes ...

Recovery process: (Below is a VM managed under vsphere)
1. Turn off the virtual machine--On the BIOS Setup CD Boot--load CentOS7 iso--Boot

2. Select Troubleshooting

3. Process Rescue Mode

4. Select Continue in rescue mode

5. Unable to switch root to see if the bin file exists, copy the corresponding command to the past

6. Restart: Init 6

The following is an example of finding a workaround and finding a recovery deleted log

[[email protected] ~]# yum install httpd-y[[email protected] ~]# systemctl start httpd

Delete error log

[[email protected] ~]# rm-rf/var/log/httpd/error_log[[email protected] ~]# ll/var/log/httpd/total 0-rw-r--r--1 root ro OT 0 June 13:49 Access_log

Recovery principle: Find the httpd corresponding to the process number, and the/proc under the file copy back to restore principle: find httpd corresponding process number, and put the file under the/proc copy back

Restore operation after mis-deletion of Linux files

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.