• harsh3466@lemmy.ml
    link
    fedilink
    English
    arrow-up
    2
    ·
    17 hours ago

    I got a test box set up with nixos and a config that runs all of my services. I wanted to test the declarative rebuild promise of it, so I:

    1. Filled the services with my some of my backed up data (a copy of the data, not the actual backup)
    2. Ran it for a few days using some of the services
    3. Backed up the data of the nixos test server, as well as the nixos config
    4. Reinstalled nixos on the test box, brought in the config, and rebuilt it.

    And it worked!!! All serviced came back with the data, all configuration was correct.

    I’m going to keep testing, and depending on how that goes I may switch my prod server and nas to nixos.

    • smiletolerantly@awful.systems
      link
      fedilink
      English
      arrow-up
      3
      ·
      16 hours ago

      Very cool!

      Re: the backup / restore of state in NixOS: I found myself writing the same things over and over again for each VM/service, so finally wrote this wrapper module (in action e.g. here for Jellyfin), which confgures both the backup services and timers, as well as adding a simple rsync-restore-jellyfin command to the system packages. In case you find this useful and don’t already have your own abstractions, or a sufficiently different use case 😄