Content
deployment feature helps deploying content from a source site collection to a
destination site collection. More details on MSDN are here. Since this feature
was giving me (still does) so many errors in my attempt to use it, thought of blogging
my approach.
Here
I’m trying to deploy content from http://dered-ca:40921 site collection to http://dered-qa:2222
site collection (dered-ca, dered-qa
are two different servers).
Configuration
in the destination server:
1.
Create new web application and create a site collection without selecting a
template.
2.
Update new web application with custom code and features by deploying all WSPs.
3.
Go to Central Administrator –> General Application Settings –> ‘Configure
content deployment’ under ‘Content Deployment’ and select options as below
Configuration
in the source server:
1.
Go to Central Administrator -> General Application Settings -> Configure
content deployment paths and jobs.
2.
Select ‘New Path’ to start creating new content deployment job and fill the
from as below
3.
Click ‘OK’ will create a path (“Export WTU”) as well as Quick Deploy job as
follows (A Quick Deploy feature supports the deployment of a single page by
authors)
4.
Then use “New Job” option or “Create Job” from the context menu as below to
create a job.
While
creating the job, if we select the database snapshots option, a snapshot of the
source content database will be created and it will be used to perform the
export, instead of directly using live content database. This option prevents
any issues that can be occurred if users edit the content while the job is
running. Snapshot will be automatically deleted after the job run.
There
is an option to test the job before its actual run.
However,
test completed does not mean that the job will run without any errors. It might
still fail in the middle. In that case click on the failed status (hyperlink) will
present a log of all errors and warnings and reason for the failure can be
identified.
If
the testing is successful we can run the job immediately with ‘Run Now’ option or
we can schedule it.
**
In destination server content deployment settings, if we select ‘Require
encryption’ option
And
specify an http URL in source configuration, we will get following error.
So
we have to either configure https in destination and specify https central
admin URL or use ‘Do not require encryption’ option.
**
If the content deployment failed for the first time and if we run it for the second
time, we will probably see following error;
The
exception thrown was 'Microsoft.SharePoint.SPException'
: 'Unable to import the folder _catalogs/masterpage/Forms/Page
Layout. There is already an object with the Id aae2e….cbb43dfab73f in the
database from another site collection.'”
In
order to fix this error I had to detach and reattach content databases from other
web applications and delete and create destination web application.