Restoring files
This topic provides a brief description on how to restore files that have been migrated to the cloud storage tier if the original files are deleted from the GFPS file system.
This option provides a non-optimized (emergency) support for manually restoring files that have been migrated to the cloud storage tier if the original stub files on the GPFS™ file system are deleted.
Note: Transparent cloud tiering does not save off the IBM Spectrum Scale™ directory and associated metadata such as ACLs. If you
want to save off your directory structure, you need use something other than Transparent cloud tiering.
To restore files, issue a command according to this
syntax:
mmcloudgateway files restore [-v] [--overwrite] [--restore-stubs-only]
{ -F FileListFile | [--dry-run] [--restore-location RestoreLocation]
[ --id ID] [--] File}
The files to be restored along with their options can be either specified at the command line, or in a separate file provided by the -F option.
Lines starting with '#' are comments. File options are specified
one option per line with the following format:
filename=<filename>
target=<target>(full path to restore the file)
id=<id>(Will be listed in cloudList output)
Files
to be restored are separated by lines with %%The following example shows the procedure for restoring the file
/gpfs0/afile:
# Restoring filename /gpfs0/afile
filename=/gpfs0/afile
target=/gpfs0/afile-33
id=33
%%
filename=/gpfs0/afile
target=/gpfs0/afile-34
id=34
%%
# Restoring filename /gpfs0/afile
filename=/gpfs0/afile
target=/gpfs0/afile-35
id=35
%%
# Restoring filename /gpfs0/afile
filename=/gpfs0/afile
target=/gpfs0/afile-latest
%%
# Restoring filename /gpfs0/afile
filename=/gpfs0/afile
The cloudList command prints the different versions for a file
# mmcloudgateway files cloudList --file versions /gpfs0/afile
The system
displays output similar to
this: id datatime datasize metatime metasize filename
13 Apr 27 03:34 6 Apr 27 03:34 499 /gpfs0/afile
14 Apr 27 03:35 12 Apr 27 03:35 693 /gpfs0/afile
The
first column on cloudList output can be used to specify which version will be
restored using the -F option:Note: To restore files, you need to provide the file names. You can retrieve the names of the
deleted files by using the mmcloudgateway files cloudList command. If you perform
any reconcile operation after deletion of the files from the local file system, the records of the
deleted files are removed from the database and hence the files cannot be restored. Therefore,
ensure that you do not perform any reconcile operation between deletion of the files and the restore
operation.
For information on the description of the parameters, see the
mmcloudgateway command .