If I understand you correctly you ePO 5.1. server is a separate server.
So, you don't need to uninstall the software on your endpoints. Once your new server is built, you can transfer devices from the old to the new server.right from the old server. Once you servers know about each other, the old server will tell the agent about the new server and it will show up on the new.
In order to set this up you have to export your agent-server secure communications keys from both server. It is under server settings, Security keys. Export the files and don't rename the files. Do that on both servers,
Under registered servers, create an epo registered servers for the other server on each server. You'll need the database connection information to do that and the security keys you exported above, enable transfer systems
Once that is done, both servers can exchange systems.
Export all you want to export from your old server: policies, task, assignments and import on the new one. Setup your new server as you want it. Once that is in place, start to transfer systems.
Move to agent 5.0, is supports peer-to-peer. Very useful on small networks (less than 1000 nodes, from my experience). You can push the agent from the new server once the agents start checking in.
Note the overall process is not perfect, you might see systems you transferred show back on the old ePO server. Keep that old server up until that doesn't happen.
For more details, go in the ePO 5.1 product guide (epo_510_pg_0b00_en-us.pdf) and look at the section "how transfer system works"
Note that you could also do an in place upgrade for much less trouble!
Thank you very much Andre!