Amin Raeiszadeh
Amin Raeiszadeh

Reputation: 208

recover deleted data from hdfs

We have a Hadoop cluster v1.2.1. We deleted one of hdfs folders by mistake, but immediately, we shut down the cluster. Is there any way to get back our data? Even if we can get back a part of our data, it would be better than none! As the data size was so much, most probably a little data has been removed.

thanks for your help.

Upvotes: 6

Views: 24003

Answers (1)

LeonardBlunderbuss
LeonardBlunderbuss

Reputation: 1274

This could be an easy fix if you have set the fs.trash.interval > 1. If this is true, HDFS's trash option is enabled, and your files should be located in the trash directory. By default, this directory is located at /user/X/.Trash.

Otherwise, your best option is probably to find and use a data recovery tool. Some quick Googling turned up this cross-platform tool available under GNU licensing that runs from the terminal: http://www.cgsecurity.org/wiki/PhotoRec. It works on many different types of file systems, and it's possible it may work for HDFS.

Upvotes: 5

Related Questions