A few days ago I was able to backup my SSD short before failure. The system was already in a quite unstable state with services like ssh failing. I was not able to export the containers properly anymore. LXD reported some integrity issues and crashed. Not sure how faulty is the disk dump, but I hope for the best regarding the zfs pool.
I would like to recover the containers in a different machine. So far I was able to:
- mount the root partition incl.
- mount the zfs pool as read-only under the temporary name
defaultis already taken on this machine), so I also have access to all files in the containers
lxdfrom snap was already present at the rescue machine
I looked at the following answer to a similar question, but I am lost in the last part:
- snap remove lxd
- snap install lxd <-- is this correct?
- zfs destroy -r default/lxd
- zfs rename backup/lxd default/lxd
- snap install lxd
- nsenter + mkdir + mount the datasets <-- I’m lost here!
- lxd import container1, etc. for all containers
So I can follow the first half, but I think renaming the pool should happen before installing
lxd again. I am quite lost in what to do in 6:
- what is the nsenter good for?
- to what directory should I mount the containers?
- is it possible to take advantage of the
lxddatabase in the backup or any other container related data during the restore?
I would be very happy about any help, since I’ve never done this before and I don’t want do destroy any of the rescued data by accident. Thank you in advance.