# Recovering Deleted Files and Folders

You can recover a file or a folder that you deleted accidentally.

### Procedure

1. From the command prompt, run the CloudTestTool with the following parameters:

       CloudTestTool -h $[endpoint_region_name] -u $[AccessKeyID] -p $[SecretAccessKey] -b $[Bucket] -f $[bucket\folderToOperate] -o $[undeleteorrevertfolderoption] -O 2022-01-01~2022-05-18 -t 2

Options | Description
--- | ---
-h | A valid endpoint name for the Amazon S3, Google Cloud, or Oracle Cloud Infrastructure region.
-u | Access key.
-p | Secret access key.
-b | Bucket name.
-f | Full path and name of the input folder.
-t | Storage vendor type. Supported values: 2 – Amazon Web Services (AWS) 3 – Microsoft Azure
-o | Operation to perform. Supported values: UndeleteFolderReportOnly – Generates a report of objects that can be undeleted without performing the undelete operation. RevertFolderReportOnly – Generates a report of objects that can be reverted to a previous version without performing the revert operation. UndeleteFolder – Undeletes deleted or versioned objects. RevertFolder – Reverts objects to a previous version. UndeleteFolderNoReport – Undeletes objects without generating a report. RevertFolderNoReport – Reverts objects without generating a report.
-O | Time range during which the files or folders were deleted.

Once the command is completed successfully, an object list file will be generated and saved under log file folder.

Sample file:

    reports with the files deleted and when with version ID
    THFBRG_Folder1/CV_MAGNETIC/V_1/CHUNK_1.FOLDER/20,2022-10-19T12:26:19Z,4ZNp.RWIplJ9paIe4nhKhGBy0Wj20uic
    THFBRG_Folder1/CV_MAGNETIC/V_1/CHUNK_1.FOLDER/21,2022-10-19T12:26:19Z,DKnFfzN.iKfW5.70fagGrLeolbZh7HYj
    THFBRG_Folder1/CV_MAGNETIC/V_1/CHUNK_1.FOLDER/22,2022-10-19T12:26:19Z,xIt8k4bJtY3l3GJLNS8DYeHm7JyYxR5o

×

Loading...