[Nix-dev] Disaster recovery / re-deployment

Marc Weber marco-oweber at gmx.de
Tue Oct 4 10:14:37 CEST 2011


Excerpts from Rickard Nilsson's message of Tue Oct 04 09:53:45 +0200
2011:

i> I took a similar route as you did, I think. I hacked nixos-install a bit,
There should be no need to hack install scripts. If they don't work for
everybody they should be improved.

> However, all that juggling with chroot, NIX_OTHER_STORES and
> /nix/store
> doesn't appeal to me :)

That's why scripts (should) deal with it for you.
You only checkout nixos sources. Then you run two commandlines and
everything should be fine.

> I'm starting to think that maybe I should just keep a dump of the Nix
> database, and the symlinks in /boot, around. Then it
> should be possible to boot up the system if I just put /nix/store,
> /boot and /etc/nixos in place, shouldn't it? When the system is booted
> I could just restore the Nix database dump, and then the old store
> would
> be perfectly valid and usable, wouldn't it? Or do I also have to
> backup
> and restore the gcroots?
No, they should be recreated when you run nixos-rebuild etc.
You need two things:
  1) put files in place (can be a backup)
  2) install boot loader (or setup init scripts)

There should be a test case for such an installation and that should
succeed and thats it. I don't think each individual should come up with
his/her own way of installing nixos. This will improve knowledge of
nixos / but in the end we want computers to "just work". That's my point
of view. Life is too short to reinvent the wheel. Because you did -
because I did - something is wrong.

You can join my git fork which still contains those changes any time.

Marc Weber


More information about the nix-dev mailing list