.\" Automatically generated by Podwrapper::Man 1.32.5 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "nbdkit-tar-filter 1" .TH nbdkit-tar-filter 1 "2023-01-04" "nbdkit-1.32.5" "NBDKIT" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" nbdkit\-tar\-filter \- read and write files inside tar files without unpacking .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& nbdkit file FILENAME.tar \-\-filter=tar tar\-entry=PATH_INSIDE_TAR .Ve .SH "EXAMPLES" .IX Header "EXAMPLES" .SS "Serve a single file inside a tarball" .IX Subsection "Serve a single file inside a tarball" .Vb 2 \& nbdkit file file.tar \-\-filter=tar tar\-entry=some/disk.img \& guestfish \-\-format=raw \-a nbd://localhost .Ve .SS "Opening a disk image inside an \s-1OVA\s0 file" .IX Subsection "Opening a disk image inside an OVA file" The popular \*(L"Open Virtual Appliance\*(R" (\s-1OVA\s0) format is really an uncompressed tar file containing (usually) VMDK-format files, so you could access one file in an \s-1OVA\s0 like this: .PP .Vb 6 \& $ tar tf rhel.ova \& rhel.ovf \& rhel\-disk1.vmdk \& rhel.mf \& $ nbdkit \-r file rhel.ova \-\-filter=tar tar\-entry=rhel\-disk1.vmdk \& $ guestfish \-\-ro \-\-format=vmdk \-a nbd://localhost .Ve .PP In this case the tarball is opened readonly (\fI\-r\fR option). The plugin supports write access, but writing to the \s-1VMDK\s0 file in the tarball does not change data checksums stored in other files (the \&\f(CW\*(C`rhel.mf\*(C'\fR file in this example), and as these will become incorrect you probably won't be able to open the file with another tool afterwards. .SS "Open a disk image inside a remote tar file" .IX Subsection "Open a disk image inside a remote tar file" You can use other plugins apart from \fBnbdkit\-file\-plugin\fR\|(1) to provide the tar file. For example if the tar file is located on a web server use: .PP .Vb 2 \& nbdkit \-r curl https://example.com/file.tar \e \& \-\-filter=tar tar\-entry=disk.img .Ve .SS "Open a compressed tar file (read-only)" .IX Subsection "Open a compressed tar file (read-only)" This filter cannot handle compressed tar files itself, but you can combine it with \fBnbdkit\-gzip\-filter\fR\|(1) or \fBnbdkit\-xz\-filter\fR\|(1): .PP .Vb 4 \& nbdkit file filename.tar.gz \e \& \-\-filter=tar tar\-entry=disk.img \-\-filter=gzip \& nbdkit file filename.tar.xz \e \& \-\-filter=tar tar\-entry=disk.img \-\-filter=xz .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\f(CW\*(C`nbdkit\-tar\-filter\*(C'\fR is a filter which can read and writes files inside an uncompressed tar file without unpacking the tar file. .PP The tar file is provided by the underlying plugin. You must tell the filter which entry in the tar file you wish to read and write using the \f(CW\*(C`tar\-entry\*(C'\fR parameter. \f(CW\*(C`tar\-entry\*(C'\fR must exactly match the file name in the tar index. Use \f(CW\*(C`tar tf filename.tar\*(C'\fR to list the index of a tar file. .PP This filter will \fBnot\fR work directly on compressed tar files. You have to combine it with another filter as shown in the example above. .PP Use the nbdkit \fI\-r\fR flag to open the file readonly. This is the safest option because it guarantees that the tar file will not be modified. Without \fI\-r\fR writes will modify the tar file. .PP The disk image cannot be resized. .SH "PARAMETERS" .IX Header "PARAMETERS" .IP "[\fBtar\-entry=\fR]PATH_INSIDE_TAR" 4 .IX Item "[tar-entry=]PATH_INSIDE_TAR" The path of the file inside the tarball to serve. This parameter is required. It must exactly match the name stored in the tarball, so use \f(CW\*(C`tar tf filename.tar\*(C'\fR .IP "\fBtar=gtar\fR" 4 .IX Item "tar=gtar" .PD 0 .IP "\fBtar=\fR/PATH/TO/GTAR" 4 .IX Item "tar=/PATH/TO/GTAR" .PD Specify the program name or full path of \s-1GNU\s0 tar, in case \f(CW\*(C`tar\*(C'\fR on \&\f(CW$PATH\fR is not \s-1GNU\s0 tar. This filter requires \s-1GNU\s0 tar and will not normally work with other tar programs (eg. on FreeBSD). .SH "FILES" .IX Header "FILES" .IP "\fI\f(CI$filterdir\fI/nbdkit\-tar\-filter.so\fR" 4 .IX Item "$filterdir/nbdkit-tar-filter.so" The plugin. .Sp Use \f(CW\*(C`nbdkit \-\-dump\-config\*(C'\fR to find the location of \f(CW$filterdir\fR. .SH "VERSION" .IX Header "VERSION" \&\f(CW\*(C`nbdkit\-tar\-filter\*(C'\fR first appeared in nbdkit 1.22. It is derived from \f(CW\*(C`nbdkit\-tar\-plugin\*(C'\fR which first appeared in nbdkit 1.2. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBnbdkit\fR\|(1), \&\fBnbdkit\-curl\-plugin\fR\|(1), \&\fBnbdkit\-file\-plugin\fR\|(1), \&\fBnbdkit\-gzip\-filter\fR\|(1), \&\fBnbdkit\-offset\-filter\fR\|(1), \&\fBnbdkit\-plugin\fR\|(3), \&\fBnbdkit\-ssh\-plugin\fR\|(1), \&\fBnbdkit\-xz\-filter\fR\|(1), \&\fBtar\fR\|(1). .SH "AUTHORS" .IX Header "AUTHORS" Richard W.M. Jones. .PP Based on the virt\-v2v \s-1OVA\s0 importer written by Tomáš Golembiovský. .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (C) 2017\-2020 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: .IP "\(bu" 4 Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. .IP "\(bu" 4 Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. .IP "\(bu" 4 Neither the name of Red Hat nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. .PP \&\s-1THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS\s0 ''\s-1AS IS\s0'' \s-1AND 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\s0 (\s-1INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES\s0; \s-1LOSS OF USE, DATA, OR PROFITS\s0; \s-1OR BUSINESS INTERRUPTION\s0) \s-1HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\s0 (\s-1INCLUDING NEGLIGENCE OR OTHERWISE\s0) \s-1ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\s0