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

  1. To back up the current state of an application,
    1. Open a terminal and navigate to BW_HOME\bin.
    2. Enter the backup command at the command line, using -s option to identify the name of the destination file. Use the -domain and appspace options with the application argument. 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
      
  2. To restore the application,
    1. Open a terminal and navigate to BW_HOME\bin.
    2. Enter the bwadmin command, 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.cmd
      

      If you are restoring to a different location, you need to update the command file as follows:

      • The agent name will point to localhost by default; you need to change this to the name of the machine 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.
    3. Use the show applications command with the -domain and -appspace options to verify the restore. If the bwagent is not running, its status will be listed as Unreachable.