diff options
Diffstat (limited to 'recipes')
-rw-r--r-- | recipes/export2tar.example | 14 | ||||
-rw-r--r-- | recipes/export2tar.html | 16 | ||||
-rwxr-xr-x | recipes/export2tar.sh | 3 |
3 files changed, 33 insertions, 0 deletions
diff --git a/recipes/export2tar.example b/recipes/export2tar.example new file mode 100644 index 00000000..47033c85 --- /dev/null +++ b/recipes/export2tar.example @@ -0,0 +1,14 @@ +$ ./export2tar.sh /dev/mapper/Guests-RHEL53PV32 /dev/VolGroup00/LogVol00 \ + /home /tmp/home.tar.gz +$ ll /tmp/home.tar.gz +-rw-rw-r--. 1 rjones rjones 824 2009-04-25 12:33 /tmp/home.tar.gz +$ tar ztf /tmp/home.tar.gz +./ +./rjones/ +./rjones/.bash_profile +./rjones/.mozilla/ +./rjones/.mozilla/extensions/ +./rjones/.mozilla/plugins/ +./rjones/.bash_logout +./rjones/.bashrc +./rjones/.emacs diff --git a/recipes/export2tar.html b/recipes/export2tar.html new file mode 100644 index 00000000..8dc07cac --- /dev/null +++ b/recipes/export2tar.html @@ -0,0 +1,16 @@ +<h2>Export the /home directory from a virtual machine into a tarball</h2> + +<p> +This script lets you export any directory you like from a virtual +machine as a tarball. For example, to export <code>/home</code> +from a standard Fedora or RHEL virtual machine you would do: +</p> + +<pre> +export2tar guest.img /dev/VolGroup00/LogVol00 /home home.tar.gz +</pre> + +<p> +<code>/dev/VolGroup00/LogVol00</code> is the partition or LV <i>inside</i> +the VM which contains the directory you want. +</p> diff --git a/recipes/export2tar.sh b/recipes/export2tar.sh new file mode 100755 index 00000000..43860bd0 --- /dev/null +++ b/recipes/export2tar.sh @@ -0,0 +1,3 @@ +#!/bin/sh - + +guestfish -a "$1" -m "$2" tgz-out "$3" "$4" |