DokuWiki stores pages/articles as text files. This came in handy when I wanted to move some namespaces from one wiki to another.
I chose to copy so that I didn't break the old wiki in the process.
cp -rpv /old/wiki/data/pages/$namespace /new/wiki/data/pages
cp -rpv /old/wiki/data/meta/$namespace /new/wiki/data/meta
cp -rpv /old/wiki/data/attic/$namespace /new/wiki/data/attic
And there you go: Namespaces copied with history. If there is media (images or other uploads) you want to look at the catalogs named "media*" as well.
After copying, I used the plugin orphanswanted to check what links I needed to fix or remove.
Go Top