Here is the procedure for migrating Online to On Premise CRM.
To request a backup of your Microsoft Dynamics CRM Online database contact Technical Support for Microsoft Dynamics CRM Online. For contact information, see Contact Technical Support.
The backup of your Microsoft Dynamics CRM Online SQL database must be restored by using a server running the same (or a newer) version of Microsoft SQL Server as the database you receive. You will be able to request the version you need before receiving the database.
Restore the copy of the Microsoft Dynamics CRM Online SQL database to a computer running SQL Server in the target Microsoft Dynamics CRM on-premises deployment. To do this, follow these steps:
a. Open Microsoft SQL Server Management Studio, and then connect to the appropriate instance of Microsoft SQL Server.
b. In Object Explorer, right-click Databases, and then click Restore Database.
c. Type the name of a new database in the To database open text box. The database name must include _MSCRM in the name. For example the database name is PoC_MSCRM.
d. On the General page, in the Source for restore section, click From device.
e. Click the browse button in the From deviceoption. This opens the Specify Backupwindow.
f. In the Specify Backup window, click the Add button to open the Locate Backup File window.
g. Select the file you want to use for the restore operation, and then click OK.
h. Click OK to close the Specify Backup window.
i. Mark the checkbox in the Restore column next to the backup set option.
j. Click OK to begin the restore process.
Click here for more information
Hope this helps