Wednesday, 2 April 2014

Backup& Restore profiles

backupConfig command

The backupConfig command is a simple utility to back up the configuration of your node to a file.
By default, all servers on the node stop before the backup is made so that partially synchronized information is not saved.

Syntax:
backupConfig.sh backup_file [options]
Options:
-nostop
    Tells the backupConfig command not to stop the servers before backup the configuration
-password password
    Specifies the password for authentication if security is enabled in the server
-username user_name
    Specifies the user name 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

Eg: backupConfig.sh node01.zip -profileName node01 -nostop

1) Full Backup

A full backup can be performed by running the ./backupConfig command from the <WAS-ROOT>/bin directory. This will backup all the configuration files under <WAS-ROOT>. We can go for a full backup if we have enough disk space. <WAS-ROOT> is the directory where the Network Deployment Package is installed.

2) Individual profile backup

We can perform backup for specific profiles by running the ./backupConfig command from the <WAS-ROOT>/bin directory with –profileName option.

Back up the Deployment Manager profile

 [root@websphe bin]# ./backupConfig.sh /u03/local/opt/was/was70/profiles/backup/dmgr/dmgr_3-4-14.zip -username bharath -password welcome321

ADMU0116I: Tool information is being logged in file
           /u03/local/opt/was/was70/profiles/dmgr/logs/backupConfig.log
ADMU0128I: Starting tool with the dmgr profile
ADMU5001I: Backing up config directory
           /u03/local/opt/was/was70/profiles/dmgr/config to file
           /u03/local/opt/was/was70/profiles/backup/dmgr/dmgr_3-4-14.zip
ADMU0505I: Servers found in configuration:
ADMU0506I: Server name: dmgr
ADMU2010I: Stopping all server processes for node Manager01
ADMU0510I: Server dmgr is now STOPPED
........................................................................................................
ADMU5002I: 847 files successfully backed up
[root@websphe bin]#

Back up the node profile

[oracle@websphe bin]$ pwd
/u03/local/opt/was/was70/profiles/node/bin

[oracle@websphe bin]$ ./backupConfig.sh /u03/local/opt/was/was70/profiles/backup/node/node.zip -nostop -username bharath -password welcome321
ADMU0116I: Tool information is being logged in file
           /u03/local/opt/was/was70/profiles/node/logs/backupConfig.log
ADMU0128I: Starting tool with the node profile
ADMU5001I: Backing up config directory
           /u03/local/opt/was/was70/profiles/node/config to file
           /u03/local/opt/was/was70/profiles/backup/node/node.zip
............................................................................................................
ADMU5002I: 1,025 files successfully backed up

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.

Syntax:
restoreConfig.sh backup_file [options]

Options:
-nostop
    Tells the restoreConfig command not to stop the servers before restoring the configuration
-password password
    Specifies the password for authentication if security is enabled in the server
-username user_name
    Specifies the user name 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

Eg: restoreConfig.sh node.zip -profileName node -nostop

Restore Dmgr profile

[oracle@websphe bin]$ ./restoreConfig.sh /u03/local/opt/was/was70/profiles/backup/dmgr/dmgr_3-4-14.zip -username bharath -password welcome321

ADMU0116I: Tool information is being logged in file
           /u03/local/opt/was/was70/profiles/dmgr/logs/restoreConfig.log
ADMU0128I: Starting tool with the dmgr profile
ADMU0505I: Servers found in configuration:
ADMU0506I: Server name: dmgr
ADMU2010I: Stopping all server processes for node Manager01
ADMU0510I: Server dmgr is now STOPPED
ADMU5502I: The directory /u03/local/opt/was/was70/profiles/dmgr/config already
           exists; renaming to
           /u03/local/opt/was/was70/profiles/dmgr/config.old
ADMU5504I: Restore location successfully renamed
ADMU5505I: Restoring file
           /u03/local/opt/was/was70/profiles/backup/dmgr/dmgr_3-4-14.zip to
           location /u03/local/opt/was/was70/profiles/dmgr/config
..........................................................................................................
.....................................................................................................
.......................ADMU5506I: 847 files successfully restored
ADMU6001I: Begin App Preparation -
ADMU6009I: Processing complete.
ADMU6002I: Begin Asset Preparation -
ADMU6009I: Processing complete.

Restore Node profile

[oracle@websphe bin]$ pwd
/u03/local/opt/was/was70/profiles/node/bin
[oracle@websphe bin]$ ./restoreConfig.sh /u03/local/opt/was/was70/profiles/backup/node/node.zip -username bharath -password welcome321 -nostop
ADMU0116I: Tool information is being logged in file
           /u03/local/opt/was/was70/profiles/node/logs/restoreConfig.log
ADMU0128I: Starting tool with the node profile
ADMU5502I: The directory /u03/local/opt/was/was70/profiles/node/config already
           exists; renaming to
           /u03/local/opt/was/was70/profiles/node/config.old
ADMU5504I: Restore location successfully renamed
ADMU5505I: Restoring file
           /u03/local/opt/was/was70/profiles/backup/node/node.zip to location
           /u03/local/opt/was/was70/profiles/node/config
....................................................................................
.................................................................................
ADMU5506I: 1,025 files successfully restored
ADMU6001I: Begin App Preparation -
ADMU6009I: Processing complete.
ADMU6002I: Begin Asset Preparation -
ADMU6009I: Processing complete.
[oracle@websphe bin]$



No comments: