<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 08/23/2018 12:14 PM, Fajar A. Nugraha wrote:<br>
    <blockquote type="cite"
cite="mid:CAG1y0sccVt_CK5zFSM1NKyP0J2Fvf_4YOUUZh-bW0X7Op8g=1g@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 23, 2018 at 2:38 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">
                <div>
                  <div class="gmail-h5"> On 08/23/2018 09:24 AM, Fajar
                    A. Nugraha wrote:<br>
                    <blockquote type="cite">
                      <div dir="ltr">
                        <div class="gmail_extra">
                          <div class="gmail_quote">On Thu, Aug 23, 2018
                            at 2:07 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"><span>On
                                08/23/2018 07:37 AM, Tamas Papp wrote:<br>
                                <blockquote class="gmail_quote"
                                  style="margin:0px 0px 0px
                                  0.8ex;border-left:1px solid
                                  rgb(204,204,204);padding-left:1ex"> <br>
                                  On 08/23/2018 05:36 AM, Pierre Couderc
                                  wrote:<br>
                                  <blockquote class="gmail_quote"
                                    style="margin:0px 0px 0px
                                    0.8ex;border-left:1px solid
                                    rgb(204,204,204);padding-left:1ex">
                                    If for any reason, "lxc copy" does
                                    not work, is it enough to copy
                                    (rsync) /var/lib/lxd/containers/xxxx
                                    to another lxd on another computer
                                    in /var/lib/lxd/containers/ ?<br>
                                  </blockquote>
                                  <br>
                                  Copy the folder (watch out rsync
                                  flags) to
                                  /var/lib/lxd/storage-pools/def<wbr>ault/containers/,
                                  symlink to /var/lib/lxd/containers and
                                  run 'lxd import'.<br>
                                  <br>
                                </blockquote>
                              </span> Thank you very much. It nearlu
                              worked.<br>
                              Anyway, it fails (in this case) because :<br>
                              Error: The storage pool's "default" driver
                              "dir" conflicts with the driver "btrfs"
                              recorded in the container's backup file<br>
                            </blockquote>
                            <div><br>
                            </div>
                            <div>If you know how lxd use btrfs to create
                              the container storage (using subvolume?),
                              you can probably create it manually, and
                              rsync there.</div>
                            <div><br>
                            </div>
                            <div><span
style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Or
                                you can create another storage pool, but
                                backed by dir (e.g. 'lxc storage create
                                pool2 dir') instead of btrfs/zfs.</span></div>
                            <div><br>
                            </div>
                            <div>Or yet another way:</div>
                            <div>- create a new container</div>
                            <div>- take note where its storage is (e.g.
                              by looking at mount options, "df -h", etc)</div>
                            <div>- shutdown the container</div>
                            <div>- replace the storage with the one you
                              need to restore</div>
                            <div><br>
                            </div>
                            <div>-- </div>
                            <div>Fajar</div>
                          </div>
                        </div>
                      </div>
                      <br>
                    </blockquote>
                  </div>
                </div>
                Thank you, I think to that.<br>
                But what is sure is that my "old" container is labelled
                as btrfs and after rsync on a "non btrfs" volume, the
                btrfs label remains....<br>
              </div>
            </blockquote>
            <div><br>
            </div>
            <div><br>
            </div>
            <div>You can edit backup.yaml to reflect the changes. Here's
              an example on my system:</div>
          </div>
        </div>
      </div>
    </blockquote>
    Fine, it was the missing point !<br>
    Thank you very much<br>
    <br>
    <blockquote type="cite"
cite="mid:CAG1y0sccVt_CK5zFSM1NKyP0J2Fvf_4YOUUZh-bW0X7Op8g=1g@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">In the case of "copy" (instead of
            backup and restore) like in my case, you'd want to change
            "volatile.eth0.hwaddr" too. Otherwise you'd end up with
            multiple containers with the same MAC and IP address.<br>
          </div>
        </div>
      </div>
    </blockquote>
    No need in my case : it is only a workaround as for some mistery, my
    "lxc copy" fails.<br>
    <br>
  </body>
</html>