阅读量:2
Here are the common methods to recover data in Debian using extract-related tools:
-
extundelete (for ext3/ext4 filesystems)
- Install:
sudo apt-get update && sudo apt-get install extundelete - Stop services: Stop all services accessing the target partition to prevent data overwriting.
- Unmount partition:
sudo umount /dev/sdXY(replace with your actual partition, e.g., /dev/sda1). - Recover specific file:
sudo extundelete /dev/sdXY --restore-file path/to/deleted/file - Recover directory:
sudo extundelete /dev/sdXY --restore-directory path/to/deleted/directory - Preview (optional): Use
--dry-runto check recovery results before actual operation.
- Install:
-
testdisk (supports multiple filesystems)
- Install:
sudo apt-get update && sudo apt-get install testdisk - Run:
sudo testdisk - Select disk: Choose the affected disk from the list.
- Analyze: Select “Analyse” → “Quick Search” (or “Deep Search” for more thorough results).
- List files: Navigate to the found partition and select “List” to view deleted files.
- Recover: Use “Undelete” to restore selected files to a safe location (different from the original partition).
- Install:
-
photorec (companion to testdisk, for various file types)
- Install:
sudo apt-get update && sudo apt-get install photorec - Run:
sudo photorec /dev/sdXY(specify the target partition). - Follow wizard:
- Choose “Proceed” and select the partition type.
- Set file system type (e.g., ext4) and analysis scope (entire partition or free space only).
- Select a destination directory (on a different partition) to save recovered files.
- Wait: Recovery may take time; avoid using the disk during this process.
- Install:
-
foremost (file carving tool)
- Install:
sudo apt install foremost - Run:
sudo foremost -t all -i /dev/sdXY -o /tmp/recovered_files(replace with your partition and desired output directory). - Check results: Recovered files are categorized by type in subdirectories under the output directory.
- Install:
Key notes for all methods:
- Stop using the affected partition immediately after data loss to minimize overwriting.
- Recover files to a different partition or external storage to avoid further data loss.
- Recovery success depends on factors like time since deletion, disk usage, and whether the data was overwritten.
以上就是关于“debian extract恢复步骤”的相关介绍,筋斗云是国内较早的云主机应用的服务商,拥有10余年行业经验,提供丰富的云服务器、租用服务器等相关产品服务。云服务器资源弹性伸缩,主机vCPU、内存性能强悍、超高I/O速度、故障秒级恢复;电子化备案,提交快速,专业团队7×24小时服务支持!
简单好用、高性价比云服务器租用链接:https://www.jindouyun.cn/product/cvm