mirror of
https://github.com/NixOS/nix.dev.git
synced 2024-10-18 00:06:26 -04:00
remove no-op command in troubleshooting advice
`nix-store --init` doesn't actually do anything [0] and is not even
documented in the Nix manual
[0]: 9651034dc2/src/nix-store/nix-store.cc (L736-L744)
This commit is contained in:
parent
6a7d821003
commit
15dfbcf6c3
|
@ -36,13 +36,12 @@ This is a [known issue](https://github.com/NixOS/nix/issues/1251).
|
||||||
|
|
||||||
It means that using a new version of Nix upgraded the SQLite schema of the [database](https://nix.dev/manual/nix/2.18/glossary#gloss-nix-database), and then you tried to use an older version Nix.
|
It means that using a new version of Nix upgraded the SQLite schema of the [database](https://nix.dev/manual/nix/2.18/glossary#gloss-nix-database), and then you tried to use an older version Nix.
|
||||||
|
|
||||||
The solution is to dump the database, use the old Nix version to initialize it, and then re-import the data:
|
The solution is to dump the database, and use the old Nix version to re-import the data:
|
||||||
|
|
||||||
```shell-session
|
```shell-session
|
||||||
$ /path/to/nix/unstable/bin/nix-store --dump-db > /tmp/db.dump
|
$ /path/to/nix/unstable/bin/nix-store --dump-db > /tmp/db.dump
|
||||||
$ mv /nix/var/nix/db /nix/var/nix/db.toonew
|
$ mv /nix/var/nix/db /nix/var/nix/db.toonew
|
||||||
$ mkdir /nix/var/nix/db
|
$ mkdir /nix/var/nix/db
|
||||||
$ nix-store --init # this is the old nix-store
|
|
||||||
$ nix-store --load-db < /tmp/db.dump
|
$ nix-store --load-db < /tmp/db.dump
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue