Backing Up and Restoring a Domain

Backing up a domain exports the current state of the specified domain and contained runtime entities to a bwadmin command file. The entire domain is backed up, including remote bwagents, if applicable to the specified domain. The command file can be provided to bwadmin to recreate the domain. Output can be compressed to a ZIP file with the -zipped option.

bwadmin Command Line

Procedure

  1. To back up the current state of a domain, including profiles and archives, enter the backup command at the command line, using the -s option to identify the name of the destination file. Use the domain argument in the command line, with the name of the domain to back up. The domain can be either a local domain or a domain in a bwagent in the agent network. By default, destination files are written to the current working directory.
    This example backs up domain Machine2Domain in a networked bwagent to a command file named machine2_domain.cmd.
    Note: Use the -noarchives option to exclude archives uploaded to the domain from the backup. (Note that references to the archives are included in the destination file. If needed, the paths in the destination file can manually be added to include archives in the restore.)

    The syntax is as follows where -na invokes the no archive option, and -z creates a zip file.

    backup -na -z -s C:/Backup/archives.zip domain Domain_Name

    backup -na -s C:/Backup/archives.cmd domain Domain_Name

    BW_HOME\bin>bwadmin backup -s machine2_domain.cmd domain Machine2Domain
    

    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.
  2. To restore the domain,
    1. Enter the bwadmin command, providing the name of the backup command file. The following example recreates the domain Machine2Domain and the contained runtime entities.
      BW_HOME\bin>bwadmin -f machine2_domain.cmd
      
    2. Use the bwadmin show domains command from the command line to verify the restore.

Admin UI

Procedure

  1. Click the down arrow for the domain on the Domain Management page and choose Backup.
  2. Click Backup in the Backup domain dialog box.
    1. To exclude archives from the backup, check the Do not back up Application Archives in this domain option.

    The contents of the domain are written to a ZIP file that is downloaded to your computer. The filename is in the format: Domain_backup_domainName.zip The ZIP file contains a .cmd file that can be used to restore the environment.