restoreConfig command

 

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. For more information about where to run this command, see the Using command line tools article.

The backupConfig command does not save authorities which may have been granted to the profile's config directory structure. The restoreConfig command sets the owner of the directory structure and its contents to QEJBSVR and restores private authorities to the QTMHHTTP and QNOTES user profiles (if they exist). It does not restore any other private authorities which may have been granted.

Note: The QEJBSVR user profile must have *R authority to the directory path specified in backup_file. If no path is specified, QEJBSVR must have *R authority to the current working directory.

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:

-nowait

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>

The directory where the backup file is restored. The location defaults to the profile_root/config directory, where profile_root is the directory that contains your profile.

-logfile <fileName>

The location of the log file to which information gets written.

-profileName

Defines the profile of the Application Server process in a multi-profile installation. The -profileName option is not required for running in a single profile environment. The default for this option is the default profile.

-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>

The user name for authentication if security is enabled in the server. Acts the same as the -user option.

-user <name>

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

-password <password>

The password for authentication if security is enabled in the server.

-help

Prints a usage statement.

-?

Prints a usage statement.

Usage scenario

The following examples demonstrate correct syntax:

restoreConfig WebSphereConfig_2003-04-22.zip

The following example restores the configuration stored in /home/mydir/myprofileBackup.zip to the configuration for profile myprofile:

restoreConfig /home/mydir/myprofileBackup.zip -profileName myprofile
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

Be aware that if you restore the configuration to a directory that is different from the directory that was backed up when you performed the backupConfig command, you may need to manually update some of the paths in the configuration directory.


Related reference
backupConfig command