AX2012 R2: Backup source environment and restore over target environment

Three processes that need to be performed for certain actions are:

  1. Compile application
  2. Compile into .NET Framework CIL
  3. Synchronize database

Please tell me which ones of the above three need to be performed for each of the following, where the database(s) of a source environment (such as PROD) are backed up and then restored over the databases(s) of a target environment (such as TEST).

I have included what I believe needs to be done, but I am very uncertain.

A. Only the modelstore database is backed up and restored
1, 2, and 3

B. Only the business/transaction database is backed up and restored
1, 2, and 3

C. Both of the databases are backed up and restored
3

If you move the whole modelstore, no compilation / CIL generation is needed. If you use another database, you surely have to synchronize it with the application (and you can easily run into ID conflicts when importing the modelstore).

I strongly recommend reading Deploying Customizations Across Microsoft Dynamics AX 2012 Environments - it will give you some idea about your options and what you should be aware of.