nbdkit-curl-plugin man page

nbdkit-curl-plugin — nbdkit curl plugin (HTTP, FTP, SSH and other protocols)

Synopsis

 nbdkit -r curl url=http://example.com/disk.img

 nbdkit -r curl url=sftp://you@example.com/~/disk.img

Description

"nbdkit-curl-plugin" is a plugin for nbdkit(1) which turns content served over HTTP, FTP, SSH, and more, into a Network Block Device.  It uses a library called libcurl (also known as cURL) to read data from URLs.  The exact list of protocols that libcurl can handle depends on how it was compiled, but most versions will handle HTTP, HTTPS, FTP, FTPS and SFTP (see: "curl -V").  For more information about libcurl, see <http://curl.haxx.se>.

Note: This plugin supports writes.  However:

To force nbdkit to use a readonly connection, pass the -r flag.

Examples

Basic usage is:

 nbdkit -r curl url=http://example.com/disk.img

which serves the remote disk image as a NBD on TCP port 10809 (to control ports and protocols used to serve NBD see nbdkit(1)).

You can also access SSH servers.  This uses the SFTP protocol which is built into most SSH servers:

 nbdkit -r curl url=sftp://example.com/~/disk.img

You may need to specify a username and/or a password.  In this example the password is read from stdin:

 nbdkit -r curl url=sftp://example.com/~/disk.img username=fred password=-

Parameters

password=PASSWORD

Set the password to use when connecting to the remote server.

Note that passing this on the command line is not secure on shared machines.

password=-

Ask for the password (interactively) when nbdkit starts up.

sslverify=0

Don't verify the SSL certificate of the remote host.

timeout=SECS

Set the timeout for requests.

timeout=0

Use the default libcurl timeout for requests.

url=URL

The URL of the remote disk image.  This is passed to libcurl directly via "CURLOPT_URL" in curl_easy_setopt(3).

This parameter is required.

user=USERNAME

Set the username to use when connecting to the remote server.  This may also be set in the URL (eg. "http://foo@example.com/disk.img")

See Also

curl(1), libcurl(3), nbdkit(1), nbdkit-plugin(3).

Authors

Richard W.M. Jones

Parts derived from Alexander Graf's "QEMU Block driver for CURL images".

License

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Referenced By

nbdkit(1).

2015-12-11 nbdkit