WAS v8.5 > Reference > Command-line utilities

restoreConfig command

Use the restoreConfig command to restore the configuration of your node after backing up the configuration using the backupConfig command.

This article is about configuration migration, such as migrating deployment managers and federated nodes in a network deployment environment. The Application Migration Toolkit for WAS provides support for migrating applications from previous versions of WAS to the latest product version. For information about migrating applications, read more about the Application Migration Toolkit. sptcfg

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 Using command line tools.

If you directly make changes to the application files in the app_server_root/installedApps directory, a process known as "hot deployment", but do not make the same changes to the application files in the app_server_root/config directory, the changes might be overwritten if we use the restoreConfig command.

The backupConfig command does not save file permissions or ownership information. The restoreConfig command uses the current umask and effective user ID (EUID) to set the permissions and ownership when restoring a file. If it is required the restored files have the original permissions and ownership, use the tar command (available on all UNIX or Linux systems) to back up and restore the configuration.

If we are using a logical directory for app_server_root/config, the restoreConfig command will not work.


Location

Issue the command from the profile_root/bin directory.


Syntax

The command syntax is as follows:

where backup_file specifies the file to be restored. If we do not specify one, the command will not run.


Parameters

The following options are available for the restoreConfig command:

-help

Prints a usage statement

-location directory_name

Directory where the backup file is restored

The location defaults to the app_server_root/config directory.

-logfile file_name

Location of the log file to which trace information is written

By default, the log file is named restoreConfig.log and is created in logs directory.

-nostop

Tells the restoreConfig command not to stop the servers before restoring the configuration

-password password

Password for authentication if security is enabled in the server

-profileName profile_name

Defines the profile of the Application Server process in a multiple-profile installation

The -profileName option is not required for running in a single profile environment. The default for this option is the default profile.

-quiet

Suppresses the progress information the restoreConfig command prints in normal mode

-replacelog

Replaces the log file instead of appending to the current log

-trace

Generates trace information into the log file for debugging purposes

-username user_name

User name for authentication if security is enabled in the server; acts the same as the -user option

-user user_name

User name for authentication if security is enabled in the server; acts the same as the -username option

-?

Prints a usage statement


Usage

We can use the restoreConfig command to recover an application server if it fails. Perform the following steps:

  1. Locate the automatic migration backup in the app_server_root/temp directory.

    For example:

      MigrationBackup.Thu-Aug-28-10.15045-2006.zip
  2. Restore the configuration with the restoreConfig command.

    For example:

      restoreConfig.sh app_server_root\temp\MigrationBackup.Thu-Aug-28-10.15045-2006.zip

      restoreConfig.bat app_server_root/temp/MigrationBackup.Thu-Aug-28-10.15045-2006.zip

The following example demonstrates correct syntax:

The following example restores the given file to the /tmp directory and does not stop any servers before beginning the restoration:

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


Related information:

backupConfig command


+

Search Tips   |   Advanced Search