0
votes

I accidentally just deleted a massive directory on my hadoop cluster using

hadoop fs -rmr /path/to/directory/

how do i undo this.

I didnt have the trash collection for hadoop setup yet "/user/X/.Trash" . I just set it up after this massive mistake. Is there any built in tools i can use to recover the directories?


Edit:

I forgot that i have a snapshot of just my client node from the cluster from before i deleted everything. What will happen if i revert to this snapshot? I know the files weren't actually deleted/overwritten just the ability to access that location in memory. Will restoring this fix it? I dont want to do anything without being sure.

1
If you don't have the trash setup, then I don't think you can recover anything.OneCricketeer

1 Answers

0
votes

The only way to recover a file if trash wasn't setup or if skipTrash was used would be if you have HDFS snapshots created. Then you could recover the file from the snapshot location.