On Thu, Aug 9, 2018 at 7:57 PM, Pierre Couderc <pie...@couderc.eu> wrote:
> > On 08/09/2018 11:30 AM, Fajar A. Nugraha wrote: > > > Basically you'd just need to copy /var/lib/lxd and whatever storage > backend you use (I use zfs), and then copy them back later. Since I also > put /var/lib/lxd on zfs (this is a custom setup), I simply need to > export-import my pool. > > > /var/lib/lxc alone, nothing about /var/lxc ? > > > Are you using lxc1 (e.g. lxc-create commands) or lxd? When lxd is installed as package (e.g. installed as apt on ubuntu), you only need /var/lib/lxd and its storage pool (which will be mounted on /var/lib/lxd/storage-pools/...). Here's what I'm using: - I start AWS spot instance - I have a custom ubuntu template, with lxd installed but not started. It thus has an empty /var/lib/lxd, with no storage pools and network. - I have a separate EBS disk, used by a zfs pool 'data'. I then have 'data/lib/lxd' which I mount as '/var/lib/lxd', and 'data/lxd' which is registered as lxd storage pool 'default'. - I create containers (using that default pool) - if that spot instance is terminated (thus the "root"/OS disk is lost), I can simply create a new spot instance again, and attach the 'data' pool there. I will then have access to all my containers. Is that similar to what you need? Note that lxc1 and lxd from snap uses different directories than lxd from package. -- Fajar
_______________________________________________ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users