XNBD-WRAPPER-CTL(8)
===================
:man source:   {manual_package}
:man version:  {manual_version}
:man manual:   {manual_title}


NAME
----
xnbd-wrapper-ctl - Manage an xnbd-wrapper(8) super-server.


SYNOPSIS
--------
*xnbd-wrapper-ctl* [options] --list

*xnbd-wrapper-ctl* [options] --add-target 'LOCAL_EXPORTNAME' 'FILE'

*xnbd-wrapper-ctl* [options] [--target-exportname 'NAME']
    --add-proxy 'LOCAL_EXPORTNAME' 'REMOTE_HOST' 'REMOTE_PORT' 'CACHE_IMAGE' 'BITMAP_IMAGE' 'CONTROL_SOCKET_PATH'

*xnbd-wrapper-ctl* [options] --remove-by-file 'FILE'

*xnbd-wrapper-ctl* [options] --remove-by-exportname 'NAME'

*xnbd-wrapper-ctl* [options] --bgctl-query 'LOCAL_EXPORTNAME'

*xnbd-wrapper-ctl* [options] --bgctl-switch 'LOCAL_EXPORTNAME'

*xnbd-wrapper-ctl* [options] --bgctl-cache-all 'LOCAL_EXPORTNAME'

*xnbd-wrapper-ctl* [options] [--target-exportname 'NAME'] --bgctl-reconnect  'LOCAL_EXPORTNAME' 'REMOTE_HOST' 'REMOTE_PORT'


DESCRIPTION
-----------
With the *xnbd-wrapper-ctl* command you can connect to an xnbd-wrapper control
channel and instruct it to act as directed. You may pass certain commands as
argument to the control program which are then forwarded, on your behalf, to
the xnbd-server instance.


OPTIONS
-------
The following options are supported:

*--add-target* 'FILE'::
    Instruct the xnbd-wrapper to add the given 'FILE' as exported xNBD
    device.

*--add-proxy* 'TARGET_HOST' 'TARGET_PORT' 'CACHE_IMAGE' 'BITMAP_IMAGE' 'CONTROL_SOCKET_PATH'::
    Instruct the xnbd-wrapper to add a proxy to the given target server.

(*--add*|*-a* 'FILE')::
    Deprecated alias to --add-target, please do not use.

*--help*|*-h*::
    Display a short usage overview and exit

*--list*|*-l*::
    Connects to the xNBD wrapper and retrieves the list of exported file
    names

*--remove-by-file* 'FILE'::
    Instruct the xnbd-wrapper to remove the volume wired to file 'FILE'
    from the list of exported xNBD devices.

*--remove-by-exportname* 'NAME'::
    Instruct the xnbd-wrapper to remove the volume exported as 'NAME'
    from the list of exported xNBD devices.

(*--remove*|*-r* 'INDEX')::
    Instruct the xnbd-wrapper to remove the volume exported on 'INDEX'
    from the list of exported xNBD devices.  Deprecated, please do not use.

*--socket*|*-s* 'SOCKETPATH'::
    Connect to 'SOCKETPATH' as xnbd-wrapper control socket. Default is
    /var/run/xnbd-wrapper.ctl.

*--target-exportname* 'NAME'::
    Set the export name to request from the proxied xnbd-wrapper target.
    This option is used in combination with *--add-proxy* and *--bgctl-reconnect*, only.

*--bgctl-cache-all*::
    Please see xnbd-bgctl(1) for details.

*--bgctl-query*::
    Please see xnbd-bgctl(1) for details.

*--bgctl-reconnect* 'REMOTE_HOST' 'REMOTE_PORT'::
    Please see xnbd-bgctl(1) for details.

*--bgctl-switch*::
    Please see xnbd-bgctl(1) for details.


POSITIONAL ARGUMENTS
--------------------
The following positional options are supported:

'FILE'::
    The disk image file location.

'LOCAL_EXPORTNAME'::
    Export name at running xnbd-wrapper(8) process.

'REMOTE_HOST'::
    Target host to connect to, IPv4 address, IPv6 address or host name.

'REMOTE_PORT'::
    TCP port number to connect to.

'CACHE_IMAGE'::
    The (cache) disk image file location.

'BITMAP_IMAGE'::
    The caching state bitmap file location.

'CONTROL_SOCKET_PATH'::
    The Unix domain socket, the xnbd-server(8) program is listening on.


SEE ALSO
--------
xnbd-wrapper(1), xnbd-server(8), xnbd-bgctl(1)


AUTHOR
------
include::author_xnbd.txt[]

include::author_toell.txt[]
