2.4.9 restore-domain
Restores files from the backup.
Synopsis
asadmin [asadmin-options] restore-domain [--help] [--long[={false|true}]] [--filename backup-filename] [--domaindir domain-root-dir] [--backupdir backup-directory] [--force[={false|true}]] [domain-name]
Storage location
Application Server installation directory/javaee/glassfish/bin
Function
The restore-domain subcommand of asadmin restores files under the domain from a backup directory. This subcommand is supported in local mode.
Additionally, the backup file that was backed up using a different operating system (OS), cannot be restored.
Precondition
The domain must be stopped.
Files
Files and subdirectories in a specified domain's directory.
Arguments
- --help | -?
-
Displays the help text for the subcommand.
- --long[={false|true}] | -l
-
Displays detailed information about the restore operation.
Type: Boolean
The following values can be specified:
-
true
-
false
Default value: false
-
- --filename backup-filename
-
Specifies the name of the backup file to be used as the source.
Type: String
The following values can be specified:
-
File name
Default value: N/A
-
- --domaindir domain-root-dir
-
Specifies the domain root directory, the parent directory of the domain to restore.
Type: String
The following values can be specified:
-
Directory path
Default value: Application Server installation directory/javaee/glassfish/domains
-
- --backupdir backup-directory
-
Specifies the directory under which the backup file is stored.
Type: String
The following values can be specified:
-
Directory path
Default value: Application Server installation directory/javaee/glassfish/domains/domain-dir/backups
If the domain is not in the default location, the location is domain-dir/backups.
-
- --force[={false|true}]
-
Enables the restore operation to continue even when the name of the domain to restore does not match the name of the domain stored in the backup file.
Type: Boolean
The following values can be specified:
-
true
-
false
Default value: false
-
- domain-name
-
Specifies the name of the domain to restore. This operand is optional if only one domain exists in Java EE Server installation.
If the specified domain name does not match the domain name stored in the backup file, an error occurs unless the --force option is specified.
Type: String
The following values can be specified:
-
Name of the domain
Default value: single domain available in Java EE Server installation
-
Examples
The following 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
Exit Status
Exit Status |
Explanation |
---|---|
0 |
subcommand executed successfully. |
1 |
error in executing the subcommand. |