On Thu, Aug 9, 2018 at 4:11 PM, Pierre Couderc <[email protected]> wrote:
> I want to "format" my LXD computer : > > So I would like to : > > - create a LXD storage on an auxiliary (btrfs) disk, something like : lxd > storage create mytmp btrfs source=/mnt/my_btrfs_unit/lxd_subvolume (is > this possible ?) > > - move my contianer to this new storage . How ? > > - fulley reinstall my server and LXD > > - "attach" my /mnt/my_btrfs_unit/lxd_subvolume to new LXD (how ?) > > - move back my container > > - detach and remove my tmp subvolume > > > If it was on another computer it would be a simple "move"... > > So basically you just want to backup and restore the complete lxd setup? What are you currently using? 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. 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). "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. -- Fajar
_______________________________________________ lxc-users mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-users
