Copying lxc containers across instances and juju profiles...

I’m trying to copy a lxc instance from one remote to another as to test a backup procedure and stumble on an issue which is likely related to lxc/lxd.

My remotes are “iceberg” and “local”, the source project is default, the target project is nextcloud.

This is my call:

lxc copy iceberg:juju-46be60-3 --project default --target-project nextcloud local:

This is my error:

Error: Failed instance creation: Requested profile “juju-nextcloud-1” doesn’t exist

Would I need to copy over the profile to make this work?

Anyone with experiences here?

[UPDATE] I found out how to do it (at least for models without storage I guess)

First, I needed to copy over the profile into the remote:

lxc profile copy juju-nextcloud-1 frozen-remote: --target-project nextcloud

Once the project was available on the remote, I can copy the container:

lxc copy iceberg:juju-46be60-3 --project default --target-project nextcloud local:
Transferring instance: nextcloud_juju-46be60-3: 690.83MB (4.84MB/s)   

Remains to figure out how to do this with storage attached! :sweat_smile:

1 Like