Migrating files in media directory under data works fine. Suspect copying over the pages directory into the new namespace would have worked ok as well, if namespace is flat and links are relative. For hierarchical structures there will be a lot of link editing to do, but that’s almost always the case anyway. And you need to browse all the pages to get them indexed anyway.