Installed, working snaps cannot be found/listed anymore

Hi. After a crash (due to overload), I see this on one of the SBC running Ubuntu 20.04/Focal Fossa (while lxc as part of the lxd snap is operating normally; one of the containers is up and running, so autostart worked):

[2022-07-06T07:25:58+0200] root@odroid02:~# arch
aarch64
[2022-07-06T10:14:28+0200] root@odroid02:~# snap list
No snaps are installed yet. Try 'snap install hello-world'.
[2022-07-06T10:14:36+0200] root@odroid02:~# lxc version
Client version: 5.3
Server version: 5.3
[2022-07-06T10:14:48+0200] root@odroid02:~# type lxc
lxc is /snap/bin/lxc

Why does snapd (2.55.5+20.04) think that there are no installed snaps? How to proceed safely since updates won’t work like this any more?

After comparing the current /var/lib/snapd/ contents with those contained in the last ZFS snapshot before the reboot, it looks like /var/lib/snapd/state.json had been “lost” (and was subsequently recreated without any information regarding the installed snaps upon reboot).

[2022-07-07T10:44:52+0200] root@odroid02:/tmp/lib@zfs-auto-snap_daily-2022-07-01-0435/snapd# diff -r --brief . /var/lib/snapd
Files ./state.json and /var/lib/snapd/state.json differ
[2022-07-07T10:47:23+0200] root@odroid02:/tmp/lib@zfs-auto-snap_daily-2022-07-01-0435/snapd# ls -l ./state.json /var/lib/snapd/state.json
-rw------- 1 root root 69275 2022-07-01 06:34:33 ./state.json
-rw------- 1 root root  1094 2022-07-07 04:20:05 /var/lib/snapd/state.json

Simply replacing the new file with its old copy seems to have done the trick in my case.

While I still have no idea regarding the underlying cause (filesystem scrub did not reveal any anomalies), this begs the question(s): Without access to a backup copy, would there have been a way to rebuild said file? (If not, shouldn’t there a backup copy be kept somewhere by snapd itself?)