restoreConfig command

The restoreConfig command is a simple utility to restore the configuration of your node after backing up the configuration using the backupConfig command. By default, all servers on the node stop before the configuration restores so that a node synchronization does not occur during the restoration. If the configuration directory already exists, it is renamed before the restoration occurs. You can run this command from the $WAS_HOME/bin directory of a WAS installation or a Network Deployment installation.

 

Syntax

The command syntax is as follows

restoreConfig <backup_file> [options]
where backup_file specifies the file to be restored. If you do not specify one, the command will not run.

 

Parameters

The following options are available for the restoreConfig command...

-nostop Tells the restoreConfig command not to stop the servers before restoring the configuration.

-quiet Suppresses the progress information that the restoreConfig command prints in normal mode.

-location <directory_name> Specifies the directory where the backup file is restored. The location defaults to the $WAS_HOME/config directory.

-logfile <fileName> Specifies the location of the log file to which information gets written.

-replacelog Replaces the log file instead of appending to the current log.

-trace Generates trace information into the log file for debugging purposes.

-username <name> Specifies the user name for authentication if security is enabled in the server. Acts the same as the -user option.

-user <name> Specifies the user name for authentication if security is enabled in the server. Acts the same as the -username option.

-password <password> Specifies the password for authentication if security is enabled in the server.

-help Prints a usage statement.

-? Prints a usage statement.

Use the restoreConfig command to recover an appserver if it fails. Perform the following steps...

  1. Locate the automatic migration backup in the $WAS_HOME/temp directory. For example: MigrationBackup.Thu-Aug-28-10.15045-2003.zip

  2. Restore the configuration with the restoreConfig command. For example: restoreConfig $WAS_HOME/temp/MigrationBackup.Thu-Aug-28-10.15045-2003.zip

 

Usage scenario

The following example demonstrates correct syntax

restoreConfig WebSphereConfig_2003-04-22.zip
The following example restores the given file to the /tmp directory and does not stop any servers before beginning the restoration

restoreConfig WebSphereConfig_2003-04-22.zip -location /tmp -nostop