<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Thank you very much, I think this is the good way !<br>
</p>
<br>
<div class="moz-cite-prefix">On 08/09/2018 11:30 AM, Fajar A.
Nugraha wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAG1y0sf_ReO=w9zyWkGOGd5aVrri=H6TwR9raPLNw3w+CtKv8A@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 4:11 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:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">I want
to "format" my LXD computer :<br>
<br>
So I would like to :<br>
<br>
- create a LXD storage on an auxiliary (btrfs) disk,
something like : lxd storage create mytmp btrfs
source=/mnt/my_btrfs_unit/lxd_<wbr>subvolume (is this
possible ?)<br>
<br>
- move my contianer to this new storage . How ?<br>
<br>
- fulley reinstall my server and LXD<br>
<br>
- "attach" my /mnt/my_btrfs_unit/lxd_subvolu<wbr>me to new
LXD (how ?)<br>
<br>
- move back my container<br>
<br>
- detach and remove my tmp subvolume<br>
<br>
<br>
If it was on another computer it would be a simple
"move"...<br>
<br>
</blockquote>
<div><br>
</div>
<div>So basically you just want to backup and restore the
complete lxd setup? What are you currently using?</div>
<div><br>
</div>
<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>
<div>If you currently use the default zfs-on-loopback
backend, you simply need to copy /var/lib/lxd and the
loopback file (I don't remember the name offhand). If you
use btrfs, then the easiest way is to detach the disk
before formatting the pool (plus copy /var/lib/lxd,
obviously).</div>
<div><br>
</div>
<div>"Moving" a container to a new storage is, AFAIK, a more
complicated process. The only way I know of is basically
create a container on that new pool, and overwrite the
content of its rootfs. I don't recommend this for your
particular needs.</div>
<div><br>
</div>
<div>-- </div>
<div>Fajar</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
lxc-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a>
<a class="moz-txt-link-freetext" href="http://lists.linuxcontainers.org/listinfo/lxc-users">http://lists.linuxcontainers.org/listinfo/lxc-users</a></pre>
</blockquote>
<br>
</body>
</html>