Backing Up and Restoring an Application
Backing up an application exports the current state of the specified application to a BWAdmin command file. The command file can be provided to BWAdmin to recreate the application state. Output can be compressed to a ZIP file with the
-zipped option.
The default application profile is backed up with the application. Additional
*.substvar files that contain application configurations can be created in the output folder.
A specific application version can be backed up by providing the
version argument. If this argument is not specified, all application versions are backed up.
- Procedure
- To back up the current state of an application,
- Open a terminal and navigate to BW_HOME\bin.
- Enter the
backupcommand at the command line, using-soption to identify the name of the destination file. Use the-domainandappspaceoptions with theapplicationargument. Provide the application version number to back up a specific version. By default, destination files are written to the current working directory.This example backs the current state of an application to a command file named app_backup.cmd.BW_HOME\bin>bwadmin backup -s app_backup.cmd -d Machine2Domain -a AS1 application acme.acct.ap.application 1.0
- To restore the application,
- Open a terminal and navigate to BW_HOME\bin.
- Enter the
bwadmincommand, providing the name of the backup command file. The following example recreates the state of the application acme.acct.ap.application. Because the application was deployed on backup, it is restored to the deployed state.BW_HOME\bin>bwadmin -f app_backup.cmdIf you are restoring to a different location, you need to update the command file as follows:
- The agent name points to
localhostby default. You need to change this to the name of the machine that you are restoring to. - Update the domain home to point to the absolute path to the new location.
- Update the path to the application archive (EAR) file to an absolute path.
- The agent name points to
- Use the
show applicationscommand with the-domainand-appspaceoptions to verify the restore. If the BWAgent is not running, its status is listed as Unreachable.