Sun GlassFish Enterprise Server 2.1 Troubleshooting Guide

Planning Ahead

As applications get deployed, undeployed, and redeployed, and as you experiment with different server configuration settings, there may be times when your server gets into a confused or unstable state. In such cases, it is useful to have a previously saved working configuration on which to fall back. This is not problem solving, per se, but rather a way to avoid problems in the first place.

The Enterprise Server asadmin command includes a backup-domain option that backs up the domain(s) you specify. Use this option to take periodic “snapshots” of your server configuration. Then, if necessary, use the restore-domain option to restore one or more domains to a known working state.

Refer to the Enterprise Server Administration Guide for complete instructions on using the asadmin backup-domain and restore-domain options. Briefly, however, for the purposes of this Troubleshooting Guide, use the following procedure to backup and restore a server configuration:

ProcedureTo back up and restore a server configuration

  1. Start the Enterprise Server.

    install_dir/bin/asadmin start-domain domain_name
  2. Stop the domain.

    install_dir/bin/asadmin stop-domain domain_name
  3. Back up the domain.

    install_dir/bin/asadmin backup-domain domain_name

    Backed up directories are stored by default in the install_dir/backups directory.

  4. Make changes to the Enterprise Server configuration and/or domain(s), as desired.

  5. If necessary, restore the server and/or domain configuration to the state saved in Step 3, above.

    install_dir/bin/asadmin restore-domain --filename backup_file domain_name