![如何使用“rm -R”命令取消删除刚刚删除的目录?](https://linux22.com/image/804297/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%E2%80%9Crm%20-R%E2%80%9D%E5%91%BD%E4%BB%A4%E5%8F%96%E6%B6%88%E5%88%A0%E9%99%A4%E5%88%9A%E5%88%9A%E5%88%A0%E9%99%A4%E7%9A%84%E7%9B%AE%E5%BD%95%EF%BC%9F.png)
我用rm -R
命令删除了一个重要的目录。这是一个非常流行的主机数据。它位于/var/zpanel/hostdata/ayrintilih
删除 ayrintilih 目录后,所有内容都消失了。
我尝试使用ext4magic
程序取消删除。但需要另一个硬盘卷才能恢复。
错误信息:
ERROR: can not use "/root/recoveried" for recover directory. It's the same filesystem : "/dev/dm-0"
我的 ISP 刚刚回复了我的请求:
Unfortunately there is no way to add another Volume to a virtual Instance.
If it would be a dedicated Server, we could do it, but not in a Cloudserver.
You could try to minimize the partition and create another one, that would
count as another Volume. We also recommend to have allways a
Backup for your Important files.
答案1
考虑到您在编辑中提供的额外细节,我想说您需要专业的帮助才有哪怕一丝机会从中恢复过来。
您可以尝试以下步骤(如果您的提供商可能)
- 关闭机器
- 从救援系统启动实例
dd
您的音量到另一台机器- 或者,询问你的 ISP 是否可以为你提供实例的映像文件
- 将此映像安装到另一台机器上
- 制作第二个卷
ext4magic
并尝试从图像文件中恢复。
是的,这很复杂,因此建议寻求专业帮助。