In the cases when you run a command like “rm *” unintentionally and you need to recover the files you just deleted then you can do the following. I’ve done the following on a ext4 file system in AWS. As soon as you realize you unintentionally deleted files do the following:

  1. Take a snapshot of the volume in AWS.
  2. Turn the snapshot into a volume.
  3. Attach the volume to an instance (I used a separate instance).
  4. Run “fsck <disk device>”, for me it was “fsck /dev/xvdh”
  5. Install “extundelete” through yum. Run “sudo yum install extundelete”.
  6. Navigate to a place for restoring files (e.g. /tmp).
  7. Then run “extundelete –restore-directory <path relative to previous mount> <disk device>”, for me it was “extundelete –restore-directory home/name/ /dev/xvdh”
  8. The entire directory of files was restored to a directory under RECOVERED_FILES.

While this worked for me and I hope it works for you, mileage may vary. Reference blog post that helped me do the above in AWS:

Run Docker Without Sudo

Update the /etc/docker/daemon.json as follow (will require root priveleges):``` json title:"/etc/docker/daemon.json"{"live-restore": tru...… Continue reading

Vagrantfile Modifications

Published on October 13, 2018

Add GUI to Dev VM

Published on October 13, 2018