nbdkit-curl-plugin(1) | NBDKIT | nbdkit-curl-plugin(1) |
nbdkit-curl-plugin - nbdkit curl plugin (HTTP, FTP, SSH and other protocols)
nbdkit -r curl [url=]http://example.com/disk.img nbdkit -r curl [url=]sftp://you@example.com/~/disk.img
"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.
Basic usage
nbdkit -r curl 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)).
Accessing SSH servers
You can also access SSH servers. This uses the SFTP protocol which is built into most SSH servers:
nbdkit -r curl 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 sftp://example.com/~/disk.img username=fred password=-
Note that passing this on the command line is not secure on shared machines.
This parameter is required.
In nbdkit ≥ 1.8.2, "url=" may be omitted.
curl(1), libcurl(3), CURLOPT_VERBOSE(3), nbdkit(1), nbdkit-plugin(3).
Richard W.M. Jones
Parts derived from Alexander Graf's "QEMU Block driver for CURL images".
Copyright (C) 2014 Red Hat Inc.
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.
2019-01-26 | nbdkit-1.10.3 |