How to move containers from a standalone node (public IP) to a cluster node (private network & public ip)?

I’m trying to move a container from a standalone lxd node to one of my clusters.

Standalone Node (source): Public IP
config:
core.https_address: ‘[::]:8443’

Remote cluster-node, part of 3-node cluster (target): Public and Private IP
cluster.https_address: 192.168.1.1:8443
core.https_address: 192.168.1.1:8443
core.trust_password: true

The remote cluster node contains a private and public IP. I want to use the public ip as target. But i’m using the internal network for the cluster and migrations.

How can I move the container without any config from the old standalone node to the clusternode?

hey there,

I think you need to change your tittle.

That tittle doesn’t explain the problem as your summary.

Regards

I can’t explain it in the title. So you have to read it to understand.

  1. lxc export the container backup on standalone node,
  2. transfer backup to a cluster node,
  3. lxc import the container backup on cluster node.

No space on the local node to export the container in a tar file. I will try to mount a remote FTP if there is no solution.

  1. you can pack the container folder throught ssh to a cluster node’s container folder ( path on my system, find yours ) :
    tar --numeric-owner -cvf - yourcontainer | ssh cluster-node "tar -C /var/lib/lxd/storage-pools/default/containers/ -xf -"
  2. then lxd import yourcontainer
1 Like

Thanks for the tip.

or you can use sshfs

lxc move has three options for how to perform network connections:

  • –mode=pull (default, target connects to source)
  • –mode=push (source connects to target)
  • –mode=relay (the machine running the CLI tool connects to both source and target and relays)
1 Like