basically both way work. which one you should choose depends if you install dp on the new server in exactly the same path. if install path (drive/directory) is different, you need to go with version 2. Export and import IDB.
In case you install your new server with a different hostname / fqdn name, you also need to change idb owner once you did copy or import the idb on the new server:
omnidbutil -show_cell_name
omnidbutil -change_cell_name
regards