How to restore incus from storage pool

I installed incus on a computer, and the storage pool uses a separate btrfs disk, but the computer where incus was installed accidentally became inaccessible, which means there is no backup of /var/lib/incus.
I reinstalled incus, is it possible to restore to the previous state from the data in the storage pool?

Hi!

You should be able to use incus admin recover and recover the full state through the storage pool.

See this post, though it’s about a ZFS storage pool. How to recover or reconnect an Incus storage pool – Mi blog lah!

Thank you very much, after several experiments, it was basically restored to its original state.
This is my summary,

  1. Restore the default network and profile
    Although it can be executed without restoring the default profile, the recover command will directly add the root device to the container configuration, which is inconsistent with the original state.

  2. Restore the server trust certificate
    The purpose is to restore incus-ui-canonical so that the customized profile can be restored in a visual way

  3. Restore all custom profiles
    Otherwise the container cannot be restored

  4. Restore all containers from a storage pool
    Execute incus admin recover!

1 Like