Hello,
I am new here. I accidentally deleted a very important .qcow2 file via the web interface. I am looking for ways to recover it. Any advice are appreciated.
I know the path of the deleted file is 'images/103/vm-103-disk-1.qcow2' and file size is exactly 200GB.
I tried extundelete
Code:
# extundelete --restore-file 'images/103/vm-103-disk-1.qcow2' /dev/mapper/pve-data WARNING: Extended attributes are not restored.
Loading filesystem metadata ... 6497 groups loaded.
Loading journal descriptors ... 25936 descriptors loaded.
Writing output to directory RECOVERED_FILES/
Unable to restore inode 33234953 (images/103/vm-103-disk-1.qcow2): No undeleted copies found in the journal.
It failed, but now I know the inode no is 33234953
Then I use ext3grep to print the inode information.
Code:
ext3grep --inode 33234953 /dev/mapper/pve-data
Running ext3grep version 0.10.1
No --ls used; implying --print.
WARNING: I don't know what EXT3_FEATURE_COMPAT_EXT_ATTR is.
Number of groups: 6497
Minimum / maximum journal block: 106398210 / 106431525
Loading journal descriptors... sorting... done
The oldest inode block that is still in the journal, appears to be from 1452683699 = Wed Jan 13 19:14:59 2016
Number of descriptors in journal: 25935; min / max sequence numbers: 17027181 / 17038553
Hex dump of inode 33234953:
0000 | a4 81 00 00 00 00 00 00 c4 9f 97 56 55 a1 97 56 | ...........VU..V
0010 | 55 a1 97 56 55 a1 97 56 00 00 00 00 00 00 00 00 | U..VU..V........
0020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
0030 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
0040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
0050 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
0060 | 00 00 00 00 34 2b ed e7 00 00 00 00 00 00 00 00 | ....4+..........
0070 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
0080 | 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
0090 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00b0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00d0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00f0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
Inode is Unallocated
Group: 4057
Generation Id: 3891079988
uid / gid: 0 / 0
mode: rrw-r--r--
size: 0
num of links: 0
sectors: 0 (--> 0 indirect blocks).
Inode Times:
Accessed: 1452777412 = Thu Jan 14 21:16:52 2016
File Modified: 1452777813 = Thu Jan 14 21:23:33 2016
Inode Modified: 1452777813 = Thu Jan 14 21:23:33 2016
Deletion time: 1452777813 = Thu Jan 14 21:23:33 2016
Direct Blocks: 0
It says the oldest inode still in journal is older then the time I deleted the file. I think I still have a hope to restore the file.
Then I restore the inode
Code:
ext3grep --restore-inode 33234953 /dev/mapper/pve-data
The output file only 72GB, but the deleted file was exactly 200GB.
I mounted the 72Gb file in Linux
Code:
modprobe nbd max_part=63
qemu-nbd -c /dev/nbd0 disk1.qcow2
mount /dev/nbd0p1 /mnt/image/
ls -la /mnt/image/
But it is empty.
I also tried "photorec", "UFS Explorer" and "R-studio" (trail version), they all failed.
The file is really important to me.
Can anyone give me any advice?
Thank you
