1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-09 03:56:01 +01:00
nix/doc/manual/src/command-ref/nix-store/export.md
John Ericson 043135a848 Document file system object content addressing
In addition:

- Take the opportunity to add a bunch more missing hyperlinks, too.

- Remove some glossary entries that are now subsumed by dedicated pages.
  We used to not be able to do this without breaking link fragments, but
  now we can, so pick up where we left off.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-05-15 16:28:48 -04:00

1.1 KiB
Raw Blame History

Name

nix-store --export - export store paths to a Nix Archive

Synopsis

nix-store --export paths…

Description

The operation --export writes a serialisation of the specified store paths to standard output in a format that can be imported into another Nix store with nix-store --import. This is like nix-store --dump, except that the Nix Archive (NAR) produced by that command doesnt contain the necessary meta-information to allow it to be imported into another Nix store (namely, the set of references of the path).

This command does not produce a closure of the specified paths, so if a store path references other store paths that are missing in the target Nix store, the import will fail.

{{#include ./opt-common.md}}

{{#include ../opt-common.md}}

{{#include ../env-common.md}}

Examples

To copy a whole closure, do something like:

$ nix-store --export $(nix-store --query --requisites paths) > out

To import the whole closure again, run:

$ nix-store --import < out