blob: 03280e0ad9a69b1423a47d1cc925f5f54c016942 [file] [log] [blame]
type=page
status=published
title=export-http-lb-config
next=export-sync-bundle.html
prev=export.html
~~~~~~
= export-http-lb-config
[[export-http-lb-config-1]][[GSRFM00133]][[export-http-lb-config]]
== export-http-lb-config
Exports the load balancer configuration or load balancer to a file
[[sthref1161]]
=== Synopsis
[source]
----
asadmin [asadmin-options] export-http-lb-config [--help]
--config config_name | --lbname load_balancer_name
[--target target] [--retrievefile=false] [file_name]
----
[[sthref1162]]
=== 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`.
[NOTE]
====
This subcommand is only applicable to {productName}. This
subcommand is not applicable to {productName}.
====
[[sthref1163]]
=== Options
asadmin-options::
Options for the `asadmin` utility. For information about these
options, see the link:asadmin.html#asadmin-1m[`asadmin`(1M)] 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 the `loadbalancer.xml` file from the
remote machine. The default is `false`.
`--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.
[[sthref1164]]
=== 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.
[[sthref1165]]
=== Examples
[[GSRFM612]][[sthref1166]]
==== 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 .
[source]
----
asadmin> export-http-lb-config --config mycluster-http-lb-config /Sun/AppServer/loadbalancer.xml
Command export-http-lb-config executed successfully.
----
[[GSRFM613]][[sthref1167]]
==== 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.
[source]
----
asadmin> export-http-lb-config --config mycluster-http-lb-config "C:\Sun\AppServer\loadbalancer.xml"
Command export-http-lb-config executed successfully.
----
[[sthref1168]]
=== Exit Status
0::
subcommand executed successfully
1::
error in executing the subcommand
[[sthref1169]]
=== See Also
link:asadmin.html#asadmin-1m[`asadmin`(1M)]
link:create-http-lb.html#create-http-lb-1[`create-http-lb`(1)],
link:create-http-lb-config.html#create-http-lb-config-1[`create-http-lb-config`(1)],
link:list-http-lb-configs.html#list-http-lb-configs-1[`list-http-lb-configs`(1)]