Home Explore Blog Models CI



nix

src/nix/store-copy-log.md
44688c4c29e2cfc06504f692986f8870361c257e038cd6a0000000030000038e
R""(

# Examples

* To copy the build log of the `hello` package from
  https://cache.nixos.org to the local store:

  ```console
  # nix store copy-log --from https://cache.nixos.org --eval-store auto nixpkgs#hello
  ```

  You can verify that the log is available locally:

  ```console
  # nix log --substituters '' nixpkgs#hello
  ```

  (The flag `--substituters ''` avoids querying
  `https://cache.nixos.org` for the log.)

* To copy the log for a specific [store derivation] via SSH:


  ```console
  # nix store copy-log --to ssh-ng://machine /nix/store/ilgm50plpmcgjhcp33z6n4qbnpqfhxym-glibc-2.33-59.drv
  ```

# Description

`nix store copy-log` copies build logs between two Nix stores. The
source store is specified using `--from` and the destination using
`--to`. If one of these is omitted, it defaults to the local store.

)""

Chunks
aee161a8 (1st chunk of `src/nix/store-copy-log.md`)
Title: Nix Store Copy-Log Command
Summary
The `nix store copy-log` command is used to copy build logs between different Nix stores. Users specify the source store with `--from` and the destination store with `--to`, with either defaulting to the local store if omitted. Examples provided include copying a build log from `https://cache.nixos.org` to the local store and verifying its local availability, as well as copying a specific store derivation log to a remote SSH store.