Error transferring instance data: Requested profile 'vlan300profile' doesn't exist

Hello,
I have an lxd container which i backup to another physical server/site. The purpose is that if the primary site goes down, i can bring up the container at the secondary site. The only different between two sites is the network profile.

I was trying to copy the container to the backup site and received the following error:

$ lxc copy matrix remote:matrix --verbose --no-profiles --refresh 
Error: Failed instance creation:
 - https://172.16.2.5:8443: Error transferring instance data: Requested profile 'vlan300profile' doesn't exist

Any idea why is this complaing about the profile?

Maybe it’s referenced by a snapshot (which would ignore --no-profiles as snapshots are immutable). Does --instance-only make this error go away?

(An obvious workaround would be to create the profile, even if empty on the target)

My workaround was to delete the container at the backup site, and copy a snapshot across using

lxc copy matrix/backup03 remote:matrix --verbose --no-profiles

I will try your suggestion next time i am making a backup.