欧美一级特黄大片做受成人-亚洲成人一区二区电影-激情熟女一区二区三区-日韩专区欧美专区国产专区

Linux下誤刪文件應(yīng)急恢復(fù)

Linux下誤刪文件應(yīng)急恢復(fù)
 
  維護中難免遇到狀態(tài)不好的時候或者新人操作不當(dāng),一個rm –f *刪除了大量的文件,導(dǎo)致生產(chǎn)重大故障,這個時候我們需要考慮文件恢復(fù),為了能夠應(yīng)對這種情況,在這里討論一個網(wǎng)上常用的恢復(fù)工具:extundelete,該工具支持ext3或者ext4.
1    安裝
首先安裝好準備包:
[root@redhat1 home]# yum install e2fs*                    --安裝extundelete軟件的依賴包
[root@redhat1 home]# rpm -aq |grep e2fs                --檢查軟件包是否安裝
e2fsprogs-devel-1.41.12-14.el6.i686
e2fsprogs-libs-1.41.12-14.el6.i686
e2fsprogs-1.41.12-14.el6.i686
 
確認gcc編譯工具齊全
gcc+
 
開始安裝
Linux下誤刪文件應(yīng)急恢復(fù)
tar xvf  extundelete-0.2.4.tar.bz2
. /configure
make
make install
 
2    使用方法
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'.根據(jù)時間點恢復(fù)之后的文件。
  --before dtime         Only process entries deleted before 'dtime'.根據(jù)時間點恢復(fù)之前的。
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    實驗恢復(fù)
創(chuàng)建目錄
/boot/test
 
創(chuàng)建測試文件
[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 root 24 Oct  9 17:11 1111111111111113.txt
 
刪除文件
rm –rf *
 
4    恢復(fù)
cd /usr/local/bin/
 
查看可恢復(fù)的文件和目錄。
./extundelete /dev/sda1 --ls --inode 2
 
直接恢復(fù)文件到當(dāng)前目錄。
./extundelete  /dev/sda1 --restore-all
查看當(dāng)前目錄:RECOVERED_FILES 就可以看到刪除的文件。
 
直接恢復(fù)指定的文件
./extundelete /dev/sda1  --restore-file vmlinuz-2.6.32-642.el6.x86_64
 
直接恢復(fù)制定的文件夾
./extundelete /dev/sda1  --restore-directory test
 
網(wǎng)上可參考學(xué)習(xí)
https://my.oschina.net/fufangchun/blog/176550
 

文章題目:Linux下誤刪文件應(yīng)急恢復(fù)
文章源于:http://aaarwkj.com/article36/igiepg.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供小程序開發(fā)、建站公司微信小程序、手機網(wǎng)站建設(shè)企業(yè)網(wǎng)站制作、微信公眾號

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

搜索引擎優(yōu)化
传媒精品视频在线观看| 91亚洲蜜桃内射后入在线观看| 免费又色又爽无遮挡网站| 在线观看视频免费午夜| 韩国日本午夜福利在线| 蜜臀av一区二区高清| 中文字幕av日韩在线| 亚洲欧美成人高清在线观看| 国产亚洲欧美另类网爆| 国产女同一区二区三区久久| 欧美午夜福利在线电影| 97在线观看视频免费| 亚洲av不卡一区二区在线观看 | 亚洲av免费一区二区三区| 在线观看男人的天堂av| 日韩网激情视频在线观看| 久久色综合色悠悠色综合色| 亚洲人妖视频在线观看| 97成品视频在线播放| 日韩电影在线观看二区| 午夜一区二区三区精品| 18禁黄久久久一区二区三区| 一起草视频在线观看视频| 国产精品麻豆一区二区三区| 成人性生活黄色三级视频| 亚洲日本欧洲二区精品| 国产综合精品一区二区| 懂色av中文一区二区| 亚洲女人下体毛茸茸视频| 91久久亚洲综合精品日本| 在线观看男人的天堂av| 国产精品一区二区三区 在线| 精品人妻一区两区三区| 亚洲一二三无人区是什么| 亚乱熟女一区二区三区| 操女逼无遮挡国产av| 日本黄色大波少妇网站| 懂色粉嫩蜜臀久久一区二区| 亚洲乱码一区二区av| 中文国产人精品久久蜜桃| 毛片一区二区三区免费看|