The simplest way to do this is to just copy the whole DokuWiki directory to the new server.
Here are a few things that might cause some trouble:
Transitions between different operating systems should not cause any trouble, DokuWiki does not care for OS specifics.