
Leading the Way: Payara Platform Community 7 Beta Now Fully Jakarta EE 11 Certified
We’re excited to announce that Payara Platform Community 7 Beta application server is now fully certified as Jakarta EE 11 […]
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’ .
{{cta(‘3382707d-3c20-4768-8acd-0a5b78c43d95’)}}
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.
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:
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.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.
We’re excited to announce that Payara Platform Community 7 Beta application server is now fully certified as Jakarta EE 11 […]
Enterprise Java applications power global commerce, healthcare, government and countless other industries. These systems must be scalable, secure and […]
May 2025 marks a monumental milestone in software development: Java turns 30. The impact of this language on the […]