creates a new domain backup configuration


create-backup-config [--help]
[--schedule schedule-name]
[--backupdir backup-directory]
[--recyclelimit recycle-limit]


The create-backup-config subcommand creates a new domain backup configuration for automatically backing up a domain. Automatic backups can include the entire domain directory or just the config subdirectory in the domain directory.

This subcommand is supported in remote mode only.



Displays the help text for the subcommand.


Specifies the name of the schedule to use for automatically backing up the domain.

The default value is the predefined schedule daily.


Specifies the base path where backup files are stored. GlassFish Server appends the subpath domain-dir/backup-config-name to the base path specified.

This option has no default value. If no value is provided, backup files are stored in domain-dir/backups/backup-config-name.


Specifies how many backup files to keep before deleting the oldest one to create a new backup.

The default value is 25.


Specifies whether the backup is to contain only the configuration files for the domain. When true, only files in the config subdirectory of the domain directory are backed up. When false, all files in the domain directory are backed up, including deployed applications.

The default value is false.


Specifies whether scheduled backups can be performed without suspending the domain. When false, the domain is suspended before the backup operation and resumed after the backup operation completes. This suspension ensures that the content of the domain directory does not change during the backup operation.

The default value is false.


Specifies whether automatic backups are enabled. When true, GlassFish Server automatically backs up the domain as indicated by the schedule specified in the domain backup configuration.

The default value is true.



Specifies the name of the domain backup configuration to create. This name must be unique across all domain backup configurations in the domain.


Example 1   Creating an Automatic Monthly Backup

This example creates a domain backup configuration named monthly-backup to backup the domain directory every month, according to the monthly schedule. At most, twelve backup files of the domain will be retained.

asadmin> create-backup-config --schedule monthly
--recyclelimit 12 monthly-backup
Command create-backup-config executed successfully.

Exit Status


subcommand executed successfully


error in executing the subcommand

See Also

delete-backup-config(1), disable-backup-config(1), enable-backup-config(1), list-backup-configs(1)