.\" @project The CERN Tape Archive (CTA) .\" @copyright Copyright © 2019-2022 CERN .\" @license This program is free software, distributed under the terms of the GNU General Public .\" Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". You can .\" redistribute it and/or modify it under the terms of the GPL Version 3, or (at your .\" option) any later version. .\" .\" This program is distributed in the hope that it will be useful, but WITHOUT ANY .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A .\" PARTICULAR PURPOSE. See the GNU General Public License for more details. .\" .\" In applying this licence, CERN does not waive the privileges and immunities .\" granted to it by virtue of its status as an Intergovernmental Organization or .\" submit itself to any jurisdiction. .TH CTA-RESTORE-DELETED-FILES "1cta" "2022-07-12" "CTA" "The CERN Tape Archive (CTA)" .SH NAME cta-restore-deleted-files \- Restore deleted files from the CTA Recycle Bin .SH SYNOPSIS .HP \fBcta-restore-deleted-files\fP [--id \fIarchive_file_id\fR] [--instance \fIdisk_instance\fR] [--fxid \fIeos_fxid\fR] [--fxidfile \fIfilename\fR] [--vid \fIvid\fR] [--copynb \fIcopy_number\fR] [--help] [--debug] .SH DESCRIPTION \fBcta-restore-deleted-files\fP restores files deleted from CTA that match some criteria. Recovered files may have been deleted by a user (with \fBeos rm\fP) or by an operator (with \fBcta-admin tapefile rm\fP). .P There are three scenarios for disk file recovery: .TP 1. The file has been deleted in the EOS namespace and in the CTA catalogue. This happens in the case of a normal file removal by the user (\fBeos rm\fP). The strategy is to reinject the file metadata into EOS and restore the file entry in the CTA catalogue (with a new disk file id). .TP 2. The file has been deleted in the CTA catalogue, but the metadata is unchanged in EOS. This can happen during disk draining. The file is kept in the EOS namespace but the entry is removed from the CTA Catalogue. The strategy is to restore the CTA Catalogue entry. .TP 3. The file has been deleted in the CTA catalogue and the EOS diskFileId changed. This can happen during the conversion of a file from a space to another. The strategy is to recover the CTA Catalogue entry and update the disk file id to the one that corresponds to the metadata in EOS. .SH OPTIONS .TP \-I, \-\-id \fIarchive_file_id\fR Archive file id of the files to restore. .TP \-i, \-\-instance \fIdisk_instance\fR Disk instance of the files to restore. .TP \-f, \-\-fxid \fIeos_fxid\fR Disk file id of the files to restore, expressed as a hexadecimal string. .TP \-F, \-\-fxidfile \fIfilename\fR Path to file containing a list of disk file ids to restore. .TP \-v, \-\-vid \fIvid\fR Volume identifier (VID) of the files to restore. .TP \-c, \-\-copynb \fIcopy_number\fR Copy number of the files to restore. .TP \-h, \-\-help Display command options and exit. .TP \-d, \-\-debug Enable debug log messages. .SH EXIT STATUS .P \fBcta-restore-deleted-files\fP returns 0 on success. .SH EXAMPLE .P cta-restore-deleted-files --vid V01007 .SH SEE ALSO .P CERN Tape Archive documentation (\fIhttps://eoscta.docs.cern.ch/\fR) .SH COPYRIGHT .P Copyright © 2022 CERN. License GPLv3+: GNU GPL version 3 or later (\fIhttp://gnu.org/licenses/gpl.html\fR). This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. In applying this licence, CERN does not waive the privileges and immunities granted to it by virtue of its status as an Intergovernmental Organization or submit itself to any jurisdiction.