What's the best/fastest/safest way to recover deleted files from ext4 ?
Specs:
Also if I manage a partial recovery of files, could I do a partial recovery of mongo's collections?
Fast Recovery of files using extundelete:
sudo umount /path/to/disk &&
sudo extundelete /path/to/disk --restore-directory /path/to/dir -o /restored/path/
/path/to/disk
represents the disk path, e.g. /dev/sdd
, /dev/mapping/label
/path/to/dir
represents the path that you want recovered relative to disk mounting point, e.g. if /dev/ssd
would be mounted at /mnt/label/
the full path would be /mnt/label/path/to/dir
and the relative path is /path/to/dir
pros of recovery with extundelete:
cons for data recovery in general
Backup before this step, mongod --repair
could delete good data
Untested, but from my understanding mongod --repair
should help repair the database if incomplete otherwise you can continue recovery for WiredTiger with :