Move EP site from one machine to another

Microsoft Dynamics AX 2009 provides simple way to import your changes to pages into AOT and use the AX xpo mechanism to export/import the page/web control and other aot changes to the other machine and deploy them.

 But there amy be cases where you have heavily customized your SharePoint site not just the pages but the theme, added content , links, libraries etc and if you need to take a back of this customzied EP SharePoint site and restore it in another machine for testing, here are the steps

Let us say you are planning to move the site from MachineA to MachineB. In MachineA you have the site with the url https://MachineA/Sites/DynamicsAX and you want to create the same site in MachineB with the url https://MachineB/Sites/AX , then

(1) In Machine  A, open up a command prompt and navigate to C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN

(2) Execute the below command

stsadm -o backup -url https://MachineA/Sites/DynamicsAX -filename c:\axep.bak

(3) Copy c:\axep.bak from MachineA to MachineB to c:\

(4) Make sure the AOD files in MachineB are the same as in MachineA

(5) Make sure EP is deployed in MachineB. ( You don't need to create the EP Site, but EP must have been deployed)

(6) Open up AX Client in Machine B And navigate to Administration->Setup->Internet->Enterprise Portal->Web Sites and delete any site entry that may already be there with https://MachineB/Sites/Ax ( Since this is the site url that you are going to use to restore).

(7) In Machine  B, open up a command prompt and navigate to C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN

(8) Execute the below command

stsadm -o restore -url https://MachineB/Sites/AX -filename c:\axep.bak

(9) Open up AX Client in Machine B And navigate to Administration->Setup->Internet->Enterprise Portal->Web Sites and Click the "Register Site" button. This will add a new row to the Websites grid. Enter https://MachineB/Sites/Ax as the internal url and external url and Type as "Full". Click on the "General" tab and check the "Company independent" check box ( or uncheck it if you want this site to be specific to a particular company in AX) and save.

(10) Now navigate to https://MachineB/Sites/AX and this should have all the changes that you made in https://MachineA/Sites/DynamicsAX