How to migrate Docker Compose data (e.g. master_kafka-data-1) to a new server?

I am curious why the forum search didn’t find any results for this topic. Can you share which search terms you used in the forum search?

I used the forum search and found an old post of mine. It should give you some inspiration:

So basically you create a temporary container to create an archive of a volumes content, copy the archive to the new host, deploy your compose project, but terminate it once the volumes are created, restore the volumes from the archives. Finally start your compose project and be good.

I am not sure if volumes created outside compose project will be claimed by the compose project, or result in an error. Since volumes created outside a compose project lack the labels that mark it as part of the project, I guess it will result in an error as the ressource already exists, but doesn’t belong to the compose project.

I hope it makes sense.