Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

recover deleted data from hdfs

Tags:

hadoop

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.

like image 760
Amin Raeiszadeh Avatar asked Mar 09 '14 06:03

Amin Raeiszadeh


1 Answers

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.

like image 97
LeonardBlunderbuss Avatar answered Oct 22 '22 13:10

LeonardBlunderbuss