My Oracle Support Banner

How to Recover Deleted Files From HDFS on a BDA Cluster up to the Time Set By the Filesystem Trash Interval in the Cloudera Manager Trash Feature (Doc ID 2184037.1)

Last updated on JANUARY 06, 2020

Applies to:

Big Data Appliance Integrated Software - Version 4.2.0 and later
Linux x86-64


On the BDA (in all but the earliest versions) the Hadoop Trash feature is enabled.  Confirm by navigating in Cloudera Manager(CM):

hdfs > Configuration > Search: Trash

"Use Trash" should be enabled.  And the "Filesystem Trash Interval fs.trash.interval" should be defaulted to 1 day. See:

When enabled, the Hadoop Trash system turns the "hadoop fs -rm" command into a move operation, which moves files into a folder named /user/$username/.Trash.  Files are retained in the "Trash folder" up to the time interval specified as above.  You can rescue files up to that time by moving them back manually.

The goal of this note is to detail how to recover deleted files from the "Trash" directory up to the time set in the CM "Filesystem Trash Interval".


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.