export-http-lb-config
This subcommand has been retained from Oracle GlassFish’s original integration with external load balancers, but it has no proper integration functionality in Payara Server. Hence, it is not intended to be used in any way. The documentation in this page may not be accurate. |
Exports the load balancer configuration or load balancer to a file.
Synopsis
asadmin [asadmin-options] export-http-lb-config [--help]
--config config_name | --lbname load_balancer_name
[--target target] [--retrievefile=false] [file_name]
Description
The export-http-lb-config
subcommand exports a load balancer configuration or load balancer into a file that the load balancer plug-in can use. The default file name is loadbalancer.xml
, but you can specify a different name. Once exported, you manually copy the exported file to the load balancer plug-in location before configuration changes are applied. The --target
option makes it possible to generate a loadbalancer.xml
for clusters or standalone instances without having to manually create lb-config
or load-balancer
elements in the target’s domain.xml
.
To apply changes to the load balancer without manually copying the configuration file, configure the load balancer to automatically apply changes with create-http-lb
. If you use the create-http-lb
subcommand, you do not need to use export-http-lb-config
.
Options
- asadmin-options
-
Options for the
asadmin
utility. For information about these options, see theasadmin
help page. --help
-?
-
Displays the help text for the subcommand.
--config
-
Specifies which load balancer configuration to export.
Specify either a load balancer configuration or a load balancer. Specifying both results in an error. --lbname
-
Specifies the load balancer to export.
Specify either a load balancer configuration or a load balancer. Specifying both results in an error. --retrievefile
-
If set to
true
, retrieves theloadbalancer.xml
file from the remote machine. The default isfalse
. --target
-
Specifies the target to which the load balancer configuration will be exported. If a target is not specified, the load balancer configuration is exported to the location specified with file_name.
Operands
- file_name
-
Specifies the file name and location of the exported configuration.
-
If you specify a directory (relative or absolute) but not a file name, the file named `loadbalancer.xml.`load_balancer_config_name is created in the specified directory. On Microsoft Windows systems the path must be in quotes.
-
If you specify a file name in a relative or absolute path, the file is created with the name you specify in the directory you specify.
-
If you specify a file name but do not specify a directory, the file is created with that name in the current working directory.
-
If you do not specify this operand, the default value is a file named
loadbalancer.xml.`load_balancer_config_name created in the domain-dir
/generated` directory.
-
- target
-
Specifies the target to which the configuration will be exported.
Valid values are:-
cluster_name - Specifies a cluster and its server instances.
-
stand-alone_instance_name - Specifies a specific server instance.
-
Examples
Example 1 Exporting a Load Balancer Configuration on UNIX
The following example exports a load balancing configuration named mycluster-http-lb-config
to a file named loadbalancer.xml
in the /Sun/AppServer
directory .
asadmin> export-http-lb-config --config mycluster-http-lb-config /Sun/AppServer/loadbalancer.xml
Command export-http-lb-config executed successfully.
Example 2 Exporting a Load Balancer Configuration on Windows
The following example exports a load balancing configuration named mycluster-http-lb-config
to a file named loadbalancer.xml
in the C:\Sun\AppServer
directory on a Microsoft Windows system.
asadmin> export-http-lb-config --config mycluster-http-lb-config "C:\Sun\AppServer\loadbalancer.xml"
Command export-http-lb-config executed successfully.