我偶然删除整个 Documents 文件夹。我想用extundelete
来恢复它。作为一个 Ubuntu 新手,我花了一个小时才正确地编写命令:
sudo extundelete /dev/sda6 --restore-directory home/ladislav/Dokumenty
ladislav@Ladislav:~$ sudo extundelete /dev/sda6 --restore-directory home/ladislav/Dokumenty
WARNING: Extended attributes are not restored.
WARNING: EXT3_FEATURE_INCOMPAT_RECOVER is set.
我怎样才能解决这个问题?
The partition should be unmounted to undelete any files without further data loss
If the partition is not currently mounted, this message indicates
it was improperly unmounted, and you should run fsck before continuing.
If you decide to continue, extundelete may overwrite some of the deleted
files and make recovering those files impossible. You should unmount the
file system and check it with fsck before using extundelete.
当我尝试卸载它时,答案是忙...
ladislav@Ladislav:~$ sudo umount /dev/sda6
umount: /: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
Would you like to continue? (y/n)
y
Loading filesystem metadata ... 344 groups loaded.
Loading journal descriptors ... 30498 descriptors loaded.
Searching for recoverable inodes in directory home/ladislav/Dokumenty ...
3300 recoverable inodes found.
Looking through the directory structure for deleted files ...
3300 recoverable inodes still lost.
No files were undeleted.
我做错了什么?(除了没有备份我的数据?)
答案1
您应该始终从活动 CD 运行数据恢复操作。
一旦删除了文件,硬盘上的物理空间就可以写入更多数据,例如 tmp 文件。如果数据被覆盖,您将无法恢复。
此外,通常最好在硬盘副本上进行工作。
从你的错误信息中
umount: /: device is busy.
/dev/sda6
以 root 身份挂载,并且您将无法卸载它。
如果你想查看硬盘的使用情况,你可以使用 lsof
sudo lsof /dev/sda6