1virt-tar(1)                 Virtualization Support                 virt-tar(1)
2
3
4

NAME

6       virt-tar - Extract or upload files to a virtual machine
7

SYNOPSIS

9        virt-tar [--options] -x domname directory tarball
10
11        virt-tar [--options] -u domname tarball directory
12
13        virt-tar [--options] disk.img [disk.img ...] -x directory tarball
14
15        virt-tar [--options] disk.img [disk.img ...] -u tarball directory
16

OBSOLETE

18       This tool is obsolete.  Use virt-copy-in(1), virt-copy-out(1),
19       virt-tar-in(1), virt-tar-out(1) as replacements.
20

EXAMPLES

22       Download "/home" from the VM into a local tarball:
23
24        virt-tar -x domname /home home.tar
25
26        virt-tar -zx domname /home home.tar.gz
27
28       Upload a local tarball and unpack it inside "/tmp" in the VM:
29
30        virt-tar -u domname uploadstuff.tar /tmp
31
32        virt-tar -zu domname uploadstuff.tar.gz /tmp
33

WARNING

35       You must not use "virt-tar" with the -u option (upload) on live virtual
36       machines.  If you do this, you risk disk corruption in the VM.
37       "virt-tar" tries to stop you from doing this, but doesn't catch all
38       cases.
39
40       You can use -x (extract) on live virtual machines, but you might get
41       inconsistent results or errors if there is filesystem activity inside
42       the VM.  If the live VM is synched and quiescent, then "virt-tar" will
43       usually work, but the only way to guarantee consistent results is if
44       the virtual machine is shut down.
45

DESCRIPTION

47       "virt-tar" is a general purpose archive tool for downloading and
48       uploading parts of a guest filesystem.  There are many possibilities:
49       making backups, uploading data files, snooping on guest activity,
50       fixing or customizing guests, etc.
51
52       If you want to just view a single file, use virt-cat(1).  If you just
53       want to edit a single file, use virt-edit(1).  For more complex cases
54       you should look at the guestfish(1) tool.
55
56       There are two modes of operation: -x (eXtract) downloads a directory
57       and its contents (recursively) from the virtual machine into a local
58       tarball.  -u uploads from a local tarball, unpacking it into a
59       directory inside the virtual machine.  You cannot use these two options
60       together.
61
62       In addition, you may need to use the -z (gZip) option to enable
63       compression.  When uploading, you have to specify -z if the upload file
64       is compressed because virt-tar won't detect this on its own.
65
66       "virt-tar" can only handle tar (optionally gzipped) format tarballs.
67       For example it cannot do PKZip files or bzip2 compression.  If you want
68       that then you'll have to rebuild the tarballs yourself.  (This is a
69       limitation of the libguestfs(3) API).
70

OPTIONS

72       --help
73           Display brief help.
74
75       --version
76           Display version number and exit.
77
78       -c URI
79       --connect URI
80           If using libvirt, connect to the given URI.  If omitted, then we
81           connect to the default libvirt hypervisor.
82
83           If you specify guest block devices directly, then libvirt is not
84           used at all.
85
86       --format raw
87           Specify the format of disk images given on the command line.  If
88           this is omitted then the format is autodetected from the content of
89           the disk image.
90
91           If disk images are requested from libvirt, then this program asks
92           libvirt for this information.  In this case, the value of the
93           format parameter is ignored.
94
95           If working with untrusted raw-format guest disk images, you should
96           ensure the format is always specified.
97
98       -x
99       --extract
100       --download
101       -u
102       --upload
103           Use -x to extract (download) a directory from a virtual machine to
104           a local tarball.
105
106           Use -u to upload and unpack from a local tarball into a virtual
107           machine.  Please read the "WARNING" section above before using this
108           option.
109
110           You must specify exactly one of these options.
111
112       -z
113       --gzip
114           Specify that the input or output tarball is gzip-compressed.
115

SHELL QUOTING

117       Libvirt guest names can contain arbitrary characters, some of which
118       have meaning to the shell such as "#" and space.  You may need to quote
119       or escape these characters on the command line.  See the shell manual
120       page sh(1) for details.
121

SEE ALSO

123       guestfs(3), guestfish(1), virt-cat(1), virt-edit(1), virt-copy-in(1),
124       virt-copy-out(1), virt-tar-in(1), virt-tar-out(1), Sys::Guestfs(3),
125       Sys::Guestfs::Lib(3), Sys::Virt(3), http://libguestfs.org/.
126

AUTHOR

128       Richard W.M. Jones http://people.redhat.com/~rjones/
129
131       Copyright (C) 2009 Red Hat Inc.
132

LICENSE

134       This program is free software; you can redistribute it and/or modify it
135       under the terms of the GNU General Public License as published by the
136       Free Software Foundation; either version 2 of the License, or (at your
137       option) any later version.
138
139       This program is distributed in the hope that it will be useful, but
140       WITHOUT ANY WARRANTY; without even the implied warranty of
141       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
142       General Public License for more details.
143
144       You should have received a copy of the GNU General Public License along
145       with this program; if not, write to the Free Software Foundation, Inc.,
146       51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
147

BUGS

149       To get a list of bugs against libguestfs, use this link:
150       https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools
151
152       To report a new bug against libguestfs, use this link:
153       https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
154
155       When reporting a bug, please supply:
156
157       ·   The version of libguestfs.
158
159       ·   Where you got libguestfs (eg. which Linux distro, compiled from
160           source, etc)
161
162       ·   Describe the bug accurately and give a way to reproduce it.
163
164       ·   Run libguestfs-test-tool(1) and paste the complete, unedited output
165           into the bug report.
166
167
168
169libguestfs-1.20.11                2013-08-27                       virt-tar(1)
Impressum