mmrestoreconfig command
Restores file system configuration information.
Synopsis
mmrestoreconfig Device -i InputFile [-I {yes | test}]
[-Q {yes | no | only}] [-W NewDeviceName]
or
mmrestoreconfig Device -i InputFile --image-restore
[-I {yes | test}] [-W NewDeviceName]
or
mmrestoreconfig Device -i InputFile -F QueryResultFile
or
mmrestoreconfig Device -i InputFile -I continue
Availability
Available with IBM Spectrum Scale™ Standard Edition or higher. Available on AIX® and Linux.
Description
The mmrestoreconfig command allows you to either query or restore, or both query and restore, the output file of the mmbackupconfig command.
In the query phase, the mmrestoreconfig command uses the output file generated by the mmbackupconfig command as an input parameter, and then creates a configuration file. Users can then edit the configuration file to fit their current file system configuration. You can use the definitions in the configuration file to create the appropriate network shared disks (NSDs) and file systems required for the restore.
In the image restore phase, the mmrestoreconfig command uses the input file (output from the mmbackupconfig command) to restore the backed up file system configuration in the newly created file system. The newly created file system must not be mounted prior to the mmimgrestore command execution thus the quota settings are turned off for image restore. They can be reactivated after the mmimgrestore command is completed using the -Q only flag of the mmrestoreconfig command.
This command cannot be run from a Windows node.
Parameters
- Device
- Specifies the name of the file system to be restored.
- -i inputFile
- Specifies the file generated by the mmbackupconfig command. The input file contains the file system configuration information.
- -I {yes | test}
- Specifies the action to be taken during the restore phase:
- yes
- Test and proceed on the restore process. This is the default action.
- test
- Test all the configuration settings before the actual restore is performed.
Use -I continue to restart mmrestoreconfig from the last known successful configuration restore.
- -F QueryResultFile
- Specifies the pathname of the configuration query result file generated by mmrestoreconfig. The configuration query result file is a report file that you can edit and use as a guide to mmcrnsd or mmcrfs.
- --image-restore
- Restores the configuration data in the proper format for Scale Out Backup and Restore (SOBAR).
- -Q {yes | no | only}
- Specifies whether quota settings are enforced during the file system restore. If set to no, the quota settings are ignored.
- To restore quota settings after the mmimgrestore command has successfully run, the -Q only option must be specified.
- -W newDeviceName
- Restores the backed up file system information to this new device name
Exit status
- 0
- Successful completion.
- nonzero
- A failure has occurred.
Security
You must have root authority to run the mmrestoreconfig command.
The node on which the command is issued must be able to execute remote shell commands on any other node in the cluster without the use of a password and without producing any extraneous messages. For more information, see Requirements for administering a GPFS file system.
Examples
- Run mmrestoreconfig -F QueryResultFile to
specify the pathname of the configuration query result file to be
generated.
mmrestoreconfig gpfs1 -i inputFile -F reportfile
- To test settings before running a restore:
The system displays output similar to:mmrestoreconfig fs1 -i /tmp/fs1.mmbackupconfig.out -I test
------------------------------------------------------------ Configuration test restore of fs1 begins at Wed Mar 14 16:00:16 EDT 2012. ------------------------------------------------------------ mmrestoreconfig: Checking disk settings for fs1: mmrestoreconfig: Checking the number of storage pools defined for fs1. The restored filesystem currently has 1 pools defined. mmrestoreconfig: Checking storage pool names defined for fs1. Storage pool 'system' defined. mmrestoreconfig: Checking storage pool size for 'system'. mmrestoreconfig: Storage pool size 127306752 was defined for 'system'. mmrestoreconfig: Checking filesystem attribute configuration for fs1: File system attribute to be restored: defaultDataReplicas Backup value: 2 Current value: 1 mmrestoreconfig: Checking fileset configurations for fs1: Fileset to restore: root. Fileset status: Linked /fs1 Fileset mode: off Fileset to restore: smallfileset. Fileset status: Linked /fs1/smallfileset Fileset mode: off mmrestoreconfig: Checking policy rule configuration for fs1: mmrestoreconfig: Testing policy configuration restore. Validated policy `policyfile.backup': parsed 1 Placement Rules, 0 Restore Rules, 0 Migrate/Delete/Exclude Rules, 0 List Rules, 0 External Pool/List Rules mmrestoreconfig: Checking quota settings for fs1: mmrestoreconfig: Checking quota enablement for fs1. mmrestoreconfig: Disabling the following settings: mmrestoreconfig: Enabling the following settings: -u -g -j mmrestoreconfig: Disabling the following default quota settings: -u -g -j mmrestoreconfig: Enabling the following default quota settings: -u -g -j mmrestoreconfig: Quota limits for fs1: mmrestoreconfig: Default Quota limits for fs1: mmrestoreconfig: Command successfully completed
- Run mmrestoreconfig to restore the gpfs1 file
system:
mmrestoreconfig gpfs1 -i inputFile
- To restore the fs9 file system configuration
data prior to the mmimgrestore command,
issue:
The system displays output similar to:mmrestoreconfig fs9 -i fs9.backupconfig --image-restore
mmrestoreconfig: Quota and DMAPI are enabled. mmrestoreconfig: Disabling quota and/or DMAPI ... -------------------------------------------------------- Configuration restore of fs9 begins at Thu Nov 29 17:09:55 EST 2012. -------------------------------------------------------- mmrestoreconfig: Checking disk settings for fs9: mmrestoreconfig: Checking the number of storage pools defined for fs9. mmrestoreconfig: Checking storage pool names defined for fs9. mmrestoreconfig: Checking storage pool size for 'system'. mmrestoreconfig: Checking filesystem attribute configuration for fs9: mmrestoreconfig: Checking policy rule configuration for fs9: mmrestoreconfig: No policy rules installed in backed up filesystem fs9. mmrestoreconfig: Command successfully completed
- To restore the quota settings for file system fs9,
after the mmimgrestore command, issue:
The system displays output similar to:mmrestoreconfig fs9 -i fs9.backupconfig -Q only
-------------------------------------------------------- Configuration restore of fs9 begins at Thu Nov 29 17:13:51 EST 2012. -------------------------------------------------------- mmrestoreconfig: Checking quota settings for fs9: mmrestoreconfig: Checking quota enablement for fs9. mmrestoreconfig: Restoring quota and defquota limits for fs9: fs9: Start quota check 11 % complete on Thu Nov 29 17:17:37 2012 22 % complete on Thu Nov 29 17:17:37 2012 33 % complete on Thu Nov 29 17:17:37 2012 44 % complete on Thu Nov 29 17:17:37 2012 55 % complete on Thu Nov 29 17:17:38 2012 69 % complete on Thu Nov 29 17:17:38 2012 84 % complete on Thu Nov 29 17:17:38 2012 100 % complete on Thu Nov 29 17:17:39 2012 Finished scanning the inodes for fs9. Merging results from scan. mmrestoreconfig: Command successfully completed