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.
Before restoring files, you must identify and list the files that need to be restored by issuing the mmcloudgateway files cloudList command.
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
You
can use the output of the cloudList command for restoring files. For more
information on the cloudList command, see Listing files migrated to the cloud storage tier.mmcloudgateway files restore [-v] [--overwrite] [--restore-stubs-only]
{ -F FileListFile | [--dry-run] [--restore-location RestoreLocation]
[ --id ID] [--] File}
By using this command, you can restore files in two different ways. That is, 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.
filename=<name of the file to be retrieved>
target=<full path to restore the file>
id=<This is the unique ID that is given to each version the file (This information is available
in the cloudList output>. If the id is not given, then the latest version of the file will
be retrieved.
# 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
following example shows how the content needs to be provided in a file (for example,
filestoberestored) for restoring the latest version of multiple files
(file1, file2, and file3):
# Restoring filename /gpfs0/file1, /gpf0/file1, and /gpfs0/file3
filename=/gpfs0/file1
target=/gpfs0/file1
%%
filename=/gpfs0/file2
target=/gpfs0/file2
%%
filename=/gpfs0/file3
target=/gpfs0/file3
Files to be restored are separated by lines with %% and # represents the comments.
mmcloudgateway files restore -F filestoberestored