Follow the instructions from the attached guide to successfully move your lms sites from one SharePoint farm to another. The document is targeting SharePoint 2013 and LMS v4.x, REM v5.x, CCM v2.x.
If you only need to copy LMS skip the steps describing REM, CCM site move.
Remember to migrate the Managed Metadata Service Application in case you're using REM Publishing feature. Otherwise you'll get an exception on the course catalog search page if REM site is not connected to Managed Metadata Store.
To make REM site use current farm's managed metadata store which you've configured you can reactivate 'REM Courses Search Configuration' farm feature (in Central Administration farm features).