How to backup WebSphere

Home > Search > How-to
  by

The backupConfig.sh (Linux) or backupConfig.bat (Windows) command can be used to create a backup of a WebSphere application server or profile. For example, the following command will back up of the entire application server.

~]# was_home/bin/backupConfig.sh AppServer-backup.zip

 

In this example, the "AppSrv01" profile is backed up.

~]# was_home/bin/profiles/AppSrv01/bin/backupConfig.sh AppSrv01-backup.zip

 


Linux Permissions and Ownership

The backupConfig and restoreConfig will not store the file permissions and ownership of files. For example, if file1.txt is owned by Admins and has permissions -rwxrwsr-x, the owner and permissions may not be proper when the backup is restored. To ensure that the permissoina and owership are stored, the TAR command can be used to create and restore a back up.In other words, you wouldn't use backupConfig.sh and restoreConfig.sh on Linux.

 


Don't stop node

By default, the backupConfig command will stop the nodes, which means that the JVMs and applications in the nodes are also stopped. The benefit to this is this ensures that the back up does not occur while a change is being made to the master repository, which could produce some problems when attempting to restore the backup. The drawback is that the nodes and JVMs will need to be restarted after the backup completes (they will not be automatically started after the backup completes).

The -nostop option can  be used to not stop the nodes as part of the backup.

~]# was_home/bin/backupConfig.sh AppServer-backup.zip -nostop

 


Username / Password

If authentication is enabled, there backupConfig command without any options will prompt you to provide a username and password. The -username and -password options can be used to provide the username and password on the command line.

~]# was_home/bin/backupConfig.sh AppServer-backup.zip -username your_username -password your_password

 

However, you probably don't want to use the -username and -password options, as the username and password can easily be intercepted using the ps command (Linux), which is a security concern. 

 


Restore a backup

The restoreConfig.sh (Linux) or restoreConfig.bat (Windows) commands can be used to restore an application server or profile from back up. For example, the following command will restore the entire application server.

~]# was_home/bin/restoreConfig.sh AppServer-backup.zip

 

In this example, the "AppSrv01" profile is restored.

~]# was_home/bin/profiles/AppSrv01/bin/restoreConfig.sh AppSrv01-backup.zip

 

If the was_home/profiles/your_profile/config directory exists, it will be renamed to config.old, and then the config directory will be restored from the backup.zip file. The following will be displayed in the console.

ADMU5502I: The directory was_home/profiles/profile01/config already exists;
           renaming to was_home/profiles/profile01/config.old
ADMU5504I: Restore location successfully renamed
ADMU5505I: Restore file backup.zip to location was_home/profiles/profile01/config

 


Don't stop node

Similar to the backupConfig command, the restoreConfig command will stop the nodes as part of the restore. The benefits and drawbacks are the same. It is also noteworthy that an additional benefit is that is a change is being made to a file in a node, the -nostop options will ensure that the file being changed does not interfere with the restore.

~]# was_home/bin/restoreConfig.sh AppServer-backup.zip -nostop

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter in the box below so that we can be sure you are a human.




Comments