<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p><br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 08/10/2018 05:27 AM, Fajar A.
      Nugraha wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAG1y0seEN1N_ieg91Zw=qF99pf_vP07titnsKFhToamcKoUGow@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">On Thu, Aug 9, 2018 at 7:57 PM,
            Pierre Couderc <span dir="ltr"><<a
                href="mailto:pierre@couderc.eu" target="_blank"
                moz-do-not-send="true">pierre@couderc.eu</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex">
              <div bgcolor="#FFFFFF"><span class="gmail-"> <br>
                  <div
                    class="gmail-m_-6329063670689149518moz-cite-prefix">On
                    08/09/2018 11:30 AM, Fajar A. Nugraha wrote:<br>
                  </div>
                </span><span class="gmail-">
                  <blockquote type="cite">
                    <div dir="ltr">
                      <div class="gmail_extra">
                        <div class="gmail_quote"><br>
                          <div>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.</div>
                          <div><br>
                          </div>
                          <br>
                        </div>
                      </div>
                    </div>
                  </blockquote>
                </span> /var/lib/lxc alone, nothing about /var/lxc ?<br>
                <br>
              </div>
              <br>
            </blockquote>
            <div><br>
            </div>
            <div>Are you using lxc1 (e.g. lxc-create commands) or lxd?</div>
            <div><br>
            </div>
            <div>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/...).</div>
            <div><br>
            </div>
            <div>Here's what I'm using:<br>
            </div>
            <div>- I start AWS spot instance</div>
            <div>- 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.</div>
            <div>- 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'.</div>
            <div>- I create containers (using that default pool)</div>
            <div>- 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.</div>
          </div>
        </div>
      </div>
    </blockquote>
    ok, fine<br>
    <blockquote type="cite"
cite="mid:CAG1y0seEN1N_ieg91Zw=qF99pf_vP07titnsKFhToamcKoUGow@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div><br>
            </div>
            <div>Is that similar to what you need?</div>
          </div>
        </div>
      </div>
    </blockquote>
    Yes, this is very similar. Thank you. <br>
    <blockquote type="cite"
cite="mid:CAG1y0seEN1N_ieg91Zw=qF99pf_vP07titnsKFhToamcKoUGow@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div><br>
            </div>
            <div>Note that lxc1 and lxd from snap uses different
              directories than lxd from package.</div>
            <div><br>
            </div>
            <div><br>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    Sorry for the noise : I use lxd (from sources on debian), and I had
    not seen that /var/lib/lxc exits but is empty...<br>
    <br>
  </body>
</html>