JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle GlassFish Server 3.1 Administration Guide
search filter icon
search icon

Document Information

Preface

1.  Overview of GlassFish Server Administration

Default Settings and Locations

Configuration Tasks

Administration Tools

Instructions for Administering GlassFish Server

Part I Runtime Administration

2.  General Administration

3.  Administering Domains

About Administering Domains

GlassFish Server Instances

Domains for Administering GlassFish Server

Domain Administration Server (DAS)

Creating, Logging In To, and Deleting a Domain

To Create a Domain

To Create a Domain From a Custom Template

To List Domains

To Log In to a Domain

To Delete a Domain

Starting and Stopping a Domain

To Start a Domain

To Stop a Domain

To Restart a Domain

Configuring a DAS or a GlassFish Server Instance for Automatic Restart

To Configure a DAS or an Instance for Automatic Restart on Windows

To Configure a DAS or an Instance for Automatic Restart on Linux

To Configure a DAS or an Instance for Automatic Restart on Oracle Solaris

To Prevent Service Shutdown When a User Logs Out on Windows

Suspending and Resuming a Domain

To Suspend a Domain

To Resume a Domain

Setting Up Automatic Backups of a Domain

To Create a Backup Configuration

To List Backup Configurations

To Enable a Backup Configuration

To Disable a Backup Configuration

To Delete a Backup Configuration

To Create a Schedule

To List Schedules

To Delete a Schedule

Backing Up and Restoring a Domain

To Back Up a Domain

To Restore a Domain

To List Domain Backups

Re-Creating the Domain Administration Server (DAS)

To Migrate the DAS

Additional Domain Tasks

To Display Domain Uptime

To Switch a Domain to Another Supported Java Version

To Change the Administration Port of a Domain

4.  Administering the Virtual Machine for the Java Platform

5.  Administering Thread Pools

6.  Administering Web Applications

7.  Administering the Logging Service

8.  Administering the Monitoring Service

9.  Writing and Running JavaScript Clients to Monitor GlassFish Server

10.  Administering Life Cycle Modules

11.  Extending and Updating GlassFish Server

Part II Resources and Services Administration

12.  Administering Database Connectivity

13.  Administering EIS Connectivity

14.  Administering Internet Connectivity

15.  Administering the Object Request Broker (ORB)

16.  Administering the JavaMail Service

17.  Administering the Java Message Service (JMS)

18.  Administering the Java Naming and Directory Interface (JNDI) Service

19.  Administering Transactions

Part III Appendixes

A.  Subcommands for the asadmin Utility

Index

Backing Up and Restoring a Domain

Creating backups is part of regular administrative duties, and GlassFish Server supports two ways to perform this duty:

The following topics are addressed here:

To Back Up a Domain

Use the backup-domain subcommand in local mode to make a backup of a specified domain.

When you use the backup-domain subcommand, GlassFish Server creates a ZIP file backup of all the files and subdirectories in the domain's directory, domain-root-dir/domain-name, except for the backups subdirectory.

The backup-domain subcommand provides several options to meet particular needs, including:

  1. Ensure that the domain is stopped or suspended.

    The backup-domain subcommand operates only when the domain is stopped or suspended.

  2. Back up the domain by using the backup-domain(1) subcommand.
  3. Restore the domain to its previous state, if necessary.

    Start or resume the domain.

Example 3-25 Backing Up the Default Domain

This example makes a backup of the default domain, domain1, storing the backup file in /net/backups.example.com/glassfish:

asadmin> backup-domain --backupdir /net/backups.example.com/glassfish domain1
Backed up domain1 at Mon Jan 17 08:16:22 PST 2011.
Command backup-domain executed successfully

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help backup-domain at the command line.

To Restore a Domain

Use the restore-domain subcommand in local mode to use a backup file to restore the files and subdirectories in a specified domain's directory.

The restore-domain subcommand can use backup files created by the backup-domain subcommand and by automatic backup configurations, both full backups and configuration-only backups. Automatic backup configurations are available only in Oracle GlassFish Server.

  1. If necessary, notify domain users that the domain is being restored from backup.
  2. Ensure that the domain is stopped.

    The restore-domain subcommand operates only when the domain is stopped.

    To determine whether the domain is running, use the list-domains(1) subcommand, as described in To List Domains.

    To stop the domain, use the stop-domain(1) subcommand as described in To Stop a Domain.

  3. Restore backup files for a domain by using the restore-domain(1) subcommand.
  4. Verify that the restore has succeeded.
  5. If necessary, notify users that the domain has been restored and is available.

Example 3-26 Restoring the Default Domain

This example restores files for the default domain, domain1, from the most recent backup stored in a specified backup directory:

asadmin> restore-domain --backupdir /net/backups.example.com/glassfish domain1
Restored the domain (domain1) to /home/user1/glassfish3/glassfish/domains/domain1
Command restore-domain executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin restore-domain --help at the command line.

To List Domain Backups

Use the list-backups subcommand in local mode to display information about backups of a specified domain stored in a specified backup directory.

The list-backups subcommand provides several options to meet particular needs, including:

Example 3-27 Listing Backups of the Default Domain

This example lists the backups of the default domain, domain1, that are stored in the /net/backups.example.com/glassfish directory:

asadmin> list-backups --backupdir /net/backups.example.com/glassfish domain1
CONFIG        USER   BACKUP DATE                   FILENAME
              user1  Mon Jan 17 08:16:22 PST 2011  domain1_2011_01_17_v00001.zip
monthly-full  user1  Wed Dec 01 00:00:00 PST 2010  domain1_2010_12_01_v00001.zip
monthly-full  user1  Sat Jan 01 00:00:03 PST 2011  domain1_2011_01_01_v00001.zip
monthly-full  user1  Tue Feb 01 00:00:01 PST 2011  domain1_2011_02_01_v00001.zip
Command list-backups executed successfully.

Note that this listing includes backups created automatically by a backup configuration. This feature is available only in Oracle GlassFish Server.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help list-backups at the command line.