How can I restore a container on a "new" machine?

lxd import <container> - note lxd not lxc .

For future searchers: there is now lxd recover

Description:
Recover missing instances and volumes from existing and unknown storage pools

This command is mostly used for disaster recovery. It will ask you about unknown storage pools and attempt to access them, along with existing storage pools, and identify any missing instances and volumes that exist on the pools but are not in the LXD database. It will then offer to recreate these database records.

1 Like