In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Under Linux accidental deletion file emergency recovery maintenance inevitably encountered when the state is not good or improper operation of new people, an rm -f * deleted a large number of files, resulting in major production failures, this time we need to consider file recovery, in order to be able to deal with this situation, here to discuss a common online recovery tool: extundelete, the tool supports ext3 or ext4. 1 Installation First install the preparation package: [root@redhat1 home]# yum install e2fs* --Install the dependency package of extundelete software [root@redhat1 home]# rpm -aq| grep e2fs --Check whether the package is installed e2fsprogs-devel-1.41.12-14.el6.i686 e2fsprogs-libs-1.41.12 - 14.el6.i686 Verify that gcc compilation tools are complete gcc+ Start installing tar xvf extundelete-0.2.4.tar.bz2 . /configure make make install 2 using the method root@localhost bin]# ./ extundelete No action specified; implying --superblock. ./ extundelete: Missing device name. Usage: ./ extundelete [options] [--] device-file Options: --version, -[vV] Print version and exit successfully. --help, Print this help and exit successfully. --superblock Print contents of superblock in addition to the rest. If no action is specified then this option is implied. --journal Show content of journal. --after dtime Only process entries deleted on or after 'dtime'. --before dtime Only process entries deleted before 'dtime'. Actions: --inode ino Show info on inode 'ino'. --block blk Show info on block 'blk'. --restore-inode ino[,ino,...] Restore the file(s) with known inode number 'ino'. The restored files are created in ./ RECOVERED_FILES with their inode number as extension (ie, file.12345). --restore-file 'path' Will restore file 'path'. 'path' is relative to root of the partition and does not start with a '/' The restored file is created in the current directory as 'RECOVERED_FILES/path'. --restore-files 'path' Will restore files which are listed in the file 'path'. Each filename should be in the same format as an option to --restore-file, and there should be one per line. --restore-directory 'path' Will restore directory 'path'. 'path' is relative to the root directory of the file system. The restored directory is created in the output directory as 'path'. --restore-all Attempts to restore everything. -j journal Reads an external journal from the named file. -b blocknumber Uses the backup superblock at blocknumber when opening the file system. -B blocksize Uses blocksize as the block size when opening the file system. The number should be the number of bytes. --log 0 Make the program silent. --log filename Logs all messages to filename. --log D1=0,D2=filename Custom control of log messages with comma-separated Examples below: list of options. Dn must be one of info, warn, or --log info,error error. Omission of the '=name' results in messages --log warn=0 with the specified level to be logged to the console. --log error=filename If the parameter is '=0', logging for the specified level will be turned off. If the parameter is '=filename', messages with that level will be written to filename. -o directory Save the recovered files to the named directory. The restored files are created in a directory named 'RECOVERED_FILES/' by default. ./ extundelete: Error parsing command-line options. 3 Lab Recovery Create directory/boot/test Create test file [root@localhost test]# ls -rlt total 12 -rw-r--r--. 1 root root 21 Oct 9 17:11 1111111111111112.txt -rw-r--r--. 1 root root 13 Oct 9 17:11 1111111111111111.txt -rw-r--r--. 1 root 24 Oct 9 17:11 11111111113.txt Delete files rm -rf * 4 Recover cd /usr/local/bin/View recoverable files and directories ./ extundelete /dev/sda1--ls --inode 2 Restore files directly to the current directory. ./ extundelete /dev/sda1 --restore-all View the current directory: RECOVERED_FILES to see the deleted files. Restore specified files directly./ extundelete /dev/sda1 --restore-file vmlinuz-2.6.32-642.el6.x86_64 Restore the specified folder directly./ The requested URL/dev/was not found on this serverhttps://my.oschina.net/fufangchun/blog/176550
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.