GlassFish to Payara Server Migration - Domain Administration Server Backup & Recovery

Photo of Fabio Turizo by Fabio Turizo

Today, continuing our series on alternatives to commercial Oracle GlassFish features, we will look at backup and restoring domains with Payara Server.

See here for part one of the GlassFish to Payara Server migration series: 'Migrating away from the Load Balancer Configurator Plugin' .

 

GlassFish to Payara Server Migration See the Guide

 

What is it?

The Domain Administration Server (DAS) contains critical information about the configuration for the domain, resources, standalone instances, clusters and applications. In case of a system or server failure, it’s crucial that this information is properly backed-up and restored as needed. Oracle GlassFish 3.x has a commercial-only feature which can backup this information on predefined or custom schedules or on demand as well. Ordinarily, the domain must be stopped to perform a backup, but the commercial edition has the capability of performing a backup by suspending the domain, or while the domain is still running.

When needed, the server's configuration can be restored by simply importing the stored backups into an existing installation.

 

How can it be replaced?

While there is no native scheduler available in Payara Server, as of version 164, the effects of this feature can be reproduced without much effort using the backup-domain subcommand and a scheduling tool set like crontab for Linux environments or Scheduled Tasks for Windows environments.

 

How do we execute a full backup of a domain with Payara Server? It's simple - just run the sub command and indicate the directory where the backup will reside:

asadmin backup-domain --backupDir /usr/local/payara/backups domain1

The backup-domain subcommand will generate a ZIP bundle named after the domain name with a versioned date time stamp. Secure this file in a synced protected hardware disc or remote host for use when restoring the domain.

 

In the case of a failure, it's easy to restore a previous backup in a new server. Use the restore-domain sub command, pointing the command to the bundled backup domain:

asadmin restore-domain --filename domain1_2016_11_23_v00001.zip --backupdir /usr/local/payara/backups/domain1

For more details, see our documentation guides on domain backup and domain restore.

 

Keep in mind:

  • The backup-domain subcommand will back up the domain successfully only if the domain is not running. When scheduling the backups using a Shell script for example, remember to stop the domain first and start it again once the backup completes.
  • The restore-domain subcommand will not influence the restoring of instances, since instances are stored separately from the domains (especially on remote hosts). Check the documentation on how to properly restore instances.

We are currently developing a generic scheduler service that will allow users to schedule any asadmin command, including backups of their domain configurations.  

This feature will offer a great value to those migrating from the commercial version of Oracle Glassfish Server since it's so much easier for the users when the server handles the scheduling itself.  The scheduler is coming soon, so stay tuned!

 

If you want to migrate from GlassFish to Payara Server, make sure you also check our our Migration Guide here. 

 

In the third blog from the GlassFish to Payara Server migration series ( coming in the next couple of days!) we will look at the Coherence Active Cache.

 

 

 

Related Posts

Comments