Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> ระบบ >> Linux

7 Data Recovery Tools ที่ดีที่สุดสำหรับ Linux

หน้าจอดำทันที หรือ laptop ค้างโดยไม่เตือน? ฮาร์ดดิสก์เริ่ม chirping? แย่กว่านั้น หนึ่งวัน save ไป home partition ไม่ได้

Signs ทั้งหมดของ corrupted หรือ failing drive ทำให้เหลือหัวใจ แตไม่มีเหตุผลทิ้งคอมพิวเตอร์ทันที อ่านต่อเรียนรู้ 6 Linux tools ช่วย retrieve data ได้ digital life กลับมาตรงราง

1. Trinity Rescue Kit

Live Linux distro สร้างเฉพาะ data recovery เหมือนทิ้งไว้ตายปีที่แล้ว แต couple years ago developer กลับมาพร้อม update ทำให้ run effectively บน modern computers

Trinity Rescue Kit คืออะไร? โดยปกติถ้า main Linux OS (หรือ Windows หรือ macOS) unusable เพราะ hard drive failure หรือ catastrophe อื่น สร้าง TRK USB drive boot เข้าไป pull data จาก main OS ใช้ command line เป็น rescue disk และดีมาก มี extra features เช่น password recovery และ virus scanning

มี bulk-undelete utility scour damaged หรือ inaccessible hard drives สำหรับอะไรที่ recover ได้ และ master boot record repair options สองแบบ ต้องเตือน learning curve steep มากเพื่อ take advantage ทุก features

2. Testdisk

Linux recovery tools บางตัวพยายาม save data โดย copy whatever retrievable จาก damaged partition ทำงานได้ แตไม่ guaranteed เพราะ issues กับ partition เองอาจ obscure data ที่ต้องการ retrieve

Testdisk ช่วยเพราะ fix partition-level errors ได้ ทำให้ recover data ด้วย Testdisk เอง หรือ data recovery tool อื่นง่ายขึ้น อาจ outright fix corrupted hard drive ทำ Linux PC ทำงานอีก ทำให้เข้าถึง data โดยตรง

นอกจาก deep-diving operations เช่น restoring boot sectors และ filesystem tables Testdisk recover data ได้ - แม้ deleted data - จาก hard drives NTFS, FAT, exFAT และ ext formats

ติดตั้ง Testdisk บน Linux ไป Terminal ใส่:

sudo apt-get install testdisk

อยากรู้เพิ่มเติมใช้ Testdisk อ่าน Testdisk guide ของเรา

3. ddrescue

ddrescue ไม่ใช่ data recovery tool ใน title แตควรเป็น first step ในการ retrieve files Ddrescue สร้าง image ของ corrupt drive หรือ partition analyze copy ของ broken disk

Copy disk ไป separate image ก่อนเริ่ม file recovery operations กับ tools ด้านล่าง ยิ่งใช้ actual failing drive ยิ่ง damage มากขึ้น

Output ของ ddrescue ใน action คำสั่งแรก copy entire disk ไป image "backup.img" คำสั่งที่สอง copy only bad blocks ไป image เดียวกัน pass over blocks สามครั้งแต่ละบล็อกพยายามอ่าน

รันคำสั่งเหล่านี้สำหรับ disk หรือ partition ของคุณ ใช้ logfile เสมอ Backups ใช้ hours หรือ days complete โดยไม่มี logfile interruptions จะทำให้เริ่ม process ใหม่จาก đầu

กระบวนการเสร็จสำหรับ disk หรือ partition mount copied image ใช้ utilities ต่อไป retrieve files จากมัน การใช้ Linux recovery tools อื่นๆ ในบทความนี้ grab data จาก "backup.img" เดียวกันที่สร้างที่นี่

4. Foremost

Foremost ใช้ data structures ของ common file types retrieve data scrape entire disk image สำหรับ all files หรือ specify file types ที่สนใจ

Output ของ Foremost ใน verbose mode (option -v) Option -t search file types jpg -i และ -o mark input file และ output directory ตามลำดับ

เห็น Foremost analyze image ddrescue สร้างขั้นก่อน image มี JPEGs หลายไฟล์ Foremost หาเจอ 10 files เสร็จ scrape image copy 10 files ไป output folder ที่ระบุ

5. scalpel

Scalpel based on Foremost เดิม aims frugal operation ใช้ multi-threading และ asynchronous I/O search images efficiently เพิ่มเติม ให้ users power specify number of footers และ headers สำหรับ file recovery

Users specify file types ที่ต้องการ recover โดย edit scalpel config file Default configuration produces มาก output แม้ไม่ verbose mode (-v parameter)

Screenshot เห็น final output ของ scalpel analysis "backup.img" basic command (listed bottom screenshot) ต้องการแค่ output directory และ image สำหรับ analysis

6. PhotoRec

PhotoRec แยกจาก competitors โดย focus recovery photographs, videos, text documents ทำงานเป็น interactive utility ใน console เอง ดู majesty ทั้งหมด

PhotoRec command เริ่มระบุ desired image (backup.img) และ output folder PhotoRec drop user เข้า graphical environment Screenshot แสดง image size หน้าจอต่อไปถาม disk partition type และ search entire image for files หรือไม่

7. grep

สุดท้าย grep อาจไม่เหมาะ recovery option straightforward แต grep มี power หา deleted หรือ lost text files โดย search strings present บน block device หรือ disk image

File มีใน backup.img ชื่อ "myfile" มีแค่บรรทัด: "This is the file I will try to recover."

Grep ใช้ string นั้น starting point file recovery พร้อม parameters อื่นๆ เห็น dump found string ไป binary file ใหม่ "foundtext"

สำคัญ ต้อง注意 และ modify -C parameter พิมพ์ extra context surrounding string ในคำสั่งเริ่มต้น ตัวอย่างคำสั่งบอก grep หา 1 line ก่อน และ 1 หลัง provided string

เริ่ม -C 200 grep หา 200 lines ทั้งก่อนและหลัง string reach เหล่านี้ unnecessary ที่นี่ แตสำคัญ larger text files hundreds of lines ต้องรู้ text ของ files ของตัวเอง grep มี starting point เริ่ม search

Grep generate binary file as output แตบางส่วน human-readable เช่น desired line ของตัวอย่าง ใกล้ bottom screenshot เป็นงาน manual scrape data ที่ต้องการ งานหนักแน่ๆ แตดีกว่า alternative ไม่มีไฟล์เลย

สรุป

สรุป: copy drive หรือ partition ด้วย ddrescue ก่อน แล้ว work บน copy ด้วย Linux recovery tools อื่นๆ ที่ต้องการ อย่ากลัวลองมากกว่า tool หนึ่ง โดยเฉพาะถ้า first choice ไม่หา data ที่ต้องการ

อดทน ด้วยโชค จะได้ precious files กลับมาก่อนรู้ตัว

บทความเผยแพร่ครั้งแรก กุมภาพันธ์ 2018 อัปเดต มีนาคม 2019