So a few days ago I started playing with and testing the MOSS content deployment feature. From my previous readings, it seemed easy enough. My approach was to go at it from scratch so that I could understand what works and what doesn't. I got quite a few errors along the way, I wanted to publish those here so that you could learn from my mistakes. As I mentioned in my previous post, we will use a 3 stage topology for content deployment. I still have some other questions around this whole process, but I will update this post as I learn more.
The first scenario I tried was moving from one site collection to another in the same Web application. That did not work out so well. I got errors along the lines of "Unable to import the folder _catalogs/masterpage/Forms/Page Layout. There is already an object with the Id 853c8232-ae6d-4626-9cae-682xxxxxx in the database from another site collection." The other error I got was "Unable to import the folder WorkflowTasks/Office SharePoint Server Workflow Task. There is already an object with the Id 3d27c6ef-cc9c-4de5-b671-xxxxxxxxxxxx in the database from another site collection.". Supposedly this error occurs when the site collections share the database and an object already exists in the database due to the first site collection that the content is being exported from. The way I got rid of this error was to create a new Web application and move content between site collections that are in different Web applications.
Moving between site collections in different Web Applications did not work initially either because the destination site collection was based on a template other than the blank template. It is imperative that the destination site collection be based on the blank template for content deployment to work. The error I got was "Content deployment job 'Remote import job for job with sourceID = e94ecf30-33d2-498d-ae5c-xxxxxxxxxxxx' failed.The exception thrown was 'Microsoft.SharePoint.SPException' : 'Cannot import site. The exported site is based on the template XYZ but the destination site is based on the template ABC. You can import sites only into sites that are based on same template as the exported site.'". By the way, the error was confusing because it did not mention that the destination site needs to be a blank site.
The other task I had to complete was to disable all the features on the target site collection. For some reason that was causing a problem. More on this later, but keep in mind that you will have to probably deactivate the features on your destination site collection.
After these corrections, the content deployment between site collections in different Web applications worked. The next test was to move the content between farms in different domains :).
Initially this did not work and failed with the following error:
"Content deployment job '[jobname]' failed. The remote upload Web request failed.". The DNS was setup correctly (using the HOSTS file) and I could browse to the destination site from a browser on the source server. I looked in the event log for an explanation of the error and found the following.
"Failed to communicate with destination server for Content Deployment job '[jobname]'. Exception was: 'System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it".
This didn't make a lot of sense right away but then I realized the problem. In the target farm, we had one app server, 2 WFEs and 1 DB server. The account that was being used to authenticate against the central administration of the target server in "Content Deployment Settings" from the source did not have permissions in the destination site collection. I gave that account permissions to the site collection and voila..it worked.