Move lxd to other server

i take a export from my lxd:
lxc publish CONTAINER_NAME --alias my-lxd
lxc image export my-lxd .
then move tarball to my new server and
lxc image import bxxxx.tar.gz --alias my-lxd
then i try to create a new-lxd-name with command
lxc init my-lxd new-lxd-name

the last one error : failed to change ACLs on /var/lib/lxd/storage-pools/default/new-lxd-name/rootfs/var/log/journal
HELP

Sounds similar to this reported bug: https://github.com/lxc/lxd/issues/6771

Can you report add your case there and advise what filesystem your storage pool is using. Thanks

i get following error:
Error: UNIQUE constraint failed: storage_volumes.storage_pool_id, storage_volumes.node_id, storage_volumes.name, storage_volumes.type

i try to move a lxd from snap version.

i using zfs
from snap installed version 3.19 with zfs file system mac net run the following command
lxc publish dontainer_name --alias my_lxd
and tar bar
"lxc images export my_lxd . "
copy tar ball to other server lxc default installation with zfs file system and bridge net
import image
lxc image import tarball.gz --alias my-lxd
ok until here the create lxd with
then lxc init my-lxd to new-container
error:
UNIQUE constraint failed: storage_volumes.storage_pool_id, storage_volumes.node_id, storage_volumes.name, storage_volumes.type

i don’t understand what happen here. But problem is solved.
i export and create it on lxd with btrfs file system then take a
lxc publish CONTAINER_NAME --alias my-lxd
lxc image export my-lxd .
and move tarball to new server with zfs as file system for lxd. then
lxc image import bxxxx.tar.gz --alias my-lxd
then i try to create a new-lxd-name with command
lxc init my-lxd new-lxd-name
just running.

So is what different that it was exported first on a ZFS filesystem and now on a BTRFS filesystem? Perhaps there is an issue exporting from ZFS, can you confirm that was the only difference?

i have a lxd on zfs and want to move to other server with zfs in lxd default. get error. then
i export it from lxd with zfs and import it to lxd on other server with btrfs as file system.
then i export it fram btrfs and export it to final server with zfs as default in lxd file system.

So I just tried this on 2 fresh ubuntu 18.04 VMs running LXD 3.19 snap with ZFS storage pools:

Steps I took (note I am using ``` (3 backticks) at start and end of command block to format the commands for readability):

VM 1:

lxc init ubuntu:18.04 c1 -s default
lxc start c1
lxc stop c1
lxc publish c1 --alias my-lxd
lxc image export my-lxd my-lxd
scp my-lxd.tar.gz vm2:

VM 2:

lxc image import my-lxd.tar.gz --alias my-lxd
lxc init my-lxd c2 -s default
lxc start c2

I didn’t encounter the ACL issue.

I suspect the unique constraint issue is caused by the ACL issue causing the lxc init to fail and not clean up fully the DB records created, so I will check our code paths for that.

Could you show me the output of:

lxd sql global 'select * from storage_volumes'