aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-01-17 17:05:54 +0100
committerLudovic Courtès <ludo@gnu.org>2015-01-17 17:05:54 +0100
commit56607088952d30b084cc858a031c68574aa07c84 (patch)
tree689c6436d29a0f71622e8f9287df4ba7dd872b0d /doc
parent9decb18c0b206100d36fac708819a718369cf369 (diff)
downloadgnu-guix-56607088952d30b084cc858a031c68574aa07c84.tar
gnu-guix-56607088952d30b084cc858a031c68574aa07c84.tar.gz
guix archive: Add -r/--recursive.
* guix/scripts/archive.scm (show-help, %options): Add -r/--recursive. (export-from-store): Pass #:recursive? to 'export-paths'. * doc/guix.texi (Invoking guix archive): Add -r in Emacs example. Add example with ~/.guix-profile. Document -r/--recursive.
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi30
1 files changed, 25 insertions, 5 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index ab97c781ef..50388c5809 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -1386,14 +1386,24 @@ to another machine's store. For example, to transfer the @code{emacs}
package to a machine connected over SSH, one would run:
@example
-guix archive --export emacs | ssh the-machine guix archive --import
+guix archive --export -r emacs | ssh the-machine guix archive --import
@end example
@noindent
-However, note that, in this example, all of @code{emacs} and its
-dependencies are transferred, regardless of what is already available in
-the target machine's store. The @code{--missing} option can help figure
-out which items are missing from the target's store.
+Similarly, a complete user profile may be transferred from one machine
+to another like this:
+
+@example
+guix archive --export -r $(readlink -f ~/.guix-profile) | \
+ ssh the-machine guix-archive --import
+@end example
+
+@noindent
+However, note that, in both examples, all of @code{emacs} and the
+profile as well as all of their dependencies are transferred (due to
+@code{-r}), regardless of what is already available in the target
+machine's store. The @code{--missing} option can help figure out which
+items are missing from the target's store.
Archives are stored in the ``Nix archive'' or ``Nar'' format, which is
comparable in spirit to `tar', but with a few noteworthy differences
@@ -1418,6 +1428,16 @@ The main options are:
Export the specified store files or packages (see below.) Write the
resulting archive to the standard output.
+Dependencies are @emph{not} included in the output, unless
+@code{--recursive} is passed.
+
+@item -r
+@itemx --recursive
+When combined with @code{--export}, this instructs @command{guix
+archive} to include dependencies of the given items in the archive.
+Thus, the resulting archive is self-contained: it contains the closure
+of the exported store items.
+
@item --import
Read an archive from the standard input, and import the files listed
therein into the store. Abort if the archive has an invalid digital