Taking a copy of LIVE/Production into TEST

We have AX4.0 and I need to get a full copy (environment and data) of the LIVE environment into the existing TEST environment. The reason for this is that some modifications have been made to LIVE that are not in TEST. The information I have managed to find uses SQL scripts and makes this sound very complex. Can anyone help simplify the process please as I don’t want to use scripts but would rather follow a list of steps.

Hope you can help.

I don’t know what kind of modifications you are talking about… could try this:

  1. Go into the LIVE environment, Administration area. Periodic\Data export/import\Definition groups, if you don’t have one create a new standard definition group to manage the export/import of data.

  2. Go into the LIVE environment, Administration area. Periodic\Data export/import\Export to, select the crated Definition group, choose a location and a file name for your backup file. File type=Binary. Ok

  3. After the backup is completed, change to the TEST environment. Go to Administration area, Periodic\Data export/import\Import. Select the same Definition group as before, select the file created with backup information. In the Advanced tab there will be some options you may need to use. Click Ok and you will have the LIVE information into the TEST environment.

The modifications are essentially fields added to some tables, some code added to methods and some changes to forms and reports. Does this solution still apply with this scenario? Thanks for the reply.

Hi Jude, I’m not a technical expert, but every time our programmers make a modification like you mention, they are also available in test environments or other companies… the process I gave you will move escentially data from one environment to the other, if you are sure those modifications are not available in test environment, the process I mentioned won’t move those developments.

No they will not be available in the TEST environment. You either need to export the development objects into an XPO and import them, or perform a SQL back up and restore the data. If you go the XPO route then you can follow the data suggestion of before and bring live into TEST. Alternatively you can use the duplicate function but this is within the same DB and as you have modification issues this would not apply.

I am not technical so cannot comment on either - if you have a partner get them to give you instructions on the layer deployment, or search here, it may have some instructions. However if you are performing development (I will ignore the massive issue of developing in a LIVE database) and do not know how to control layers and move objects then you are in a very worrying position.


Usually when a developer does any AX development, the AX objects that got created or modified will be stored in a separate AX project.

If this is the case, then you can follow this article to export from Product and import into your Test environment - http://msdn.microsoft.com/en-us/library/aa834499(v=ax.10).aspx

Also you may have to consider export / import label files. If you search here, you will find step by step instructions for exporting/importing them.

The main thing you have to consider in code export / import is the layer. For instance, if customisations were made in CUS layer in production, then ideally these changes should be imported into CUS layer in Test environment. As much as possible, try to keep test and production environment identical to avoid any issues in future.

If you have any queries, please feel free to ask.

Technical here…there are a million ways to accomplish what you want, but if you are just looking to get a good working copy of your live environment for testing purposes with the least amount of steps, then I’d just replace your TEST environment with a LIVE copy.

FIRST, it sounds like Test/Live have become out of sync, this is bad practice, but easily fixed with this method. You should never have fields added directly into live without first putting them into test and actually testing them. There are probably no real issues with your current environment, but it should be fixed because your table/field IDs could become out of sync and cause many other issues. You should fix your DEV too.

SECOND, to restore the copy of PROD:

Stop your TEST aos, restore a copy of your LIVE database over your TEST database. Verify the permissions for the AOS user are correct after the restore in SQL. If you have a user called AXProd and one called AXTest…make sure AXTest is the owner of the DB and remove AXProd from the restored DB or else your AOS will not start. If the AOS does not start, check the windows event log for details.

Then just copy your entire LIVE application directory over to the TEST application directory and just replace/delete the TEST one. The directory is typically C:\Program Files\Microsoft Dynamics AX\50\Application\Appl[InstanceName] and make sure the folder name is the same. You should technically do this with the LIVE aos stopped, but it should be ok. Application files are flushed at midnight or something.

You should be able to just start the AOS now. You will need to tweak/reconfigure somethings though. Admin>Setup>Server Config is the first thing I do and make sure the TEST AOS is setup as a batch or else you will not have a batch machine. You should delete the LIVE AOS line from here too.

You can sync/compile for good measure if you want, but it isn’t required since what you’re copying is already compiled and sync’d.

If you have any automated emails or automated system processes, you should realize that this is a copy of live, so depending on your customizations, there may be some considerations. For example, we have our live system sending customers emails automatically…if we restore to a test system, the customers might now get automated emails twice, one from live and one from test.

EDIT: This is for AX 2009, I just noticed you said AX 4.0. The only difference is the batch setup…the rest is the same.

Feel free to ask any more questions.

Thank you everyone for all your responses. This will help me to get everything tidy and as it should be. It’s good to know there are people out there willing to help!

So this is what I should do too? I have a similar question as Jude, mine is taking my report from the DEV environment to the the TEST then to LIVE

I restored the PROD database
Created necessary user logins in SQL
deleted current C:\Program Files\Microsoft Dynamics AX\50\Application\Appl[InstanceName] and copied the PROD Appl[InstanceName] in this place

AOS starts fine… changed the database(selected restored database) in Server configuration

The issue is all my projects are not showing up in Dev/Test Env
We mostly have our code in usr layer but now in Test env after the restore cannot see any usr layer projects and other object

Kindly advice