How do export and them import chats into another server?

How do I export the chat history of all chats, and import it again onto another OpenFire server?