Just in case you haven’t done this before, here’s a primer. For the sake of this example I am assuming host ‘oldserver’ is reachable at 10.0.0.10, and I am calling the new server ‘new-server’
Instructions:
SSH into old server and issue a token:
incus config trust add new-server
Client newserver certificate add token:
eyJjbGllbnRfbmFtZSI6Im5ld3NlcnZlciIsImZpbmdlcnByaW50IjoiNTBmODgyYzE0MzllODMxNDE0YmI1MTZhZjYyZGM2NWY5NzdjZjVjZDI4MzVhNjg2YTczMjRlMWY4NjhjMDYzYyIsImFkZHJlc3NlcyI6WyIxMC4yMzEuMjUuMjQ6ODQ0MyIsIjEwLjIzMS4yNS4xNDo4NDQzIiwiMTAuMjMxLjI1LjE2Mjo4NDQzIiwiMTcyLjE2LjUwLjE0Ojg0NDMiLCIxNzIuMTYuNTAuMTAzOjg0NDMiLCIxMC4yMy4xNi4xOjg0NDMiXSwic2VjcmV0IjoiOWVjY2EwZGVhMjZjYmI3ZjQ2ZTVjZDg4MGQ5MDI5YmRmZWE5MjdkM2JjZjc0NTBlZDhkOWExNjgyNzU3NTc2NyIsImV4cGlyZXNfYXQiOiIwMDAxLTAxLTAxVDAwOjAwOjAwWiJ9
Copy the long token string (every character). Now ssh into new server as usual and issue the following command, and then follow the prompts, pasting the long token blob above into the terminal for the requested ‘trust token’:
incus remote add oldserver 10.0.0.10
Certificate fingerprint: 50f882c1439e831414bb516af62dc65f977cf5cd2835a686a7324e1f868c063c
ok (y/n/[fingerprint])? yes
Trust token for oldserver: eyJjbGllbnRfbmFtZSI6Im5ld3NlcnZlciIsImZpbmdlcnByaW50IjoiNTBmODgyYzE0MzllODMxNDE0YmI1MTZhZjYyZGM2NWY5NzdjZjVjZDI4MzVhNjg2YTczMjRlMWY4NjhjMDYzYyIsImFkZHJlc3NlcyI6WyIxMC4yMzEuMjUuMjQ6ODQ0MyIsIjEwLjIzMS4yNS4xNDo4NDQzIiwiMTAuMjMxLjI1LjE2Mjo4NDQzIiwiMTcyLjE2LjUwLjE0Ojg0NDMiLCIxNzIuMTYuNTAuMTAzOjg0NDMiLCIxMC4yMy4xNi4xOjg0NDMiXSwic2VjcmV0IjoiZTIxN2E3MDA4NmRiY2M5MDQyYjUwZTUzMTg2Y2I5OWQyN2I1MGQ4NTM3MjBhM2IzMTA2N2YwMjE2MDdjMWU1NCIsImV4cGlyZXNfYXQiOiIwMDAxLTAxLTAxVDAwOjAwOjAwWiJ9
Client certificate now trusted by server: oldserver
root@new-server:~#
Now you have a connection from new server to old server (not the other way round). So you can list and copy instances, profiles etc. from the oldserver by issuing commands at the new-server:
root@new-server:~# incus list oldserver: # <-- make sure there's a colon after the name
+-------------------------+---------+-----------------------+------+-----------------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+-------------------------+---------+-----------------------+------+-----------------+-----------+
| Instance-Name | STOPPED | | | VIRTUAL-MACHINE | 11 |
+-------------------------+---------+-----------------------+------+-----------------+-----------+
And then pull copies of what you need, e.g. pull a copy of an instance named ‘daily-status’ from the oldserver and assign it the same name at the new server:
root@new-server:~# incus copy oldserver:daily-status daily-status
Transferring instance: daily-status: 368.08MB (18.36MB/s)
root@new-server:~#
Beware that an instance on the old server has a profile, and it will expect a profile with the same name on the new server. So if you need to, pull copies of profiles over first and maybe modify them if the new-server is configured differently from the old one. Containers, vms, profiles - everything can be copied over. For more detail see the docs.
V/R
Andrew