Common Problem with Content Deployment: mixing incremental and full deployment
A common error I often see is that customers are mixing incremental and full deployment when deploying a site collection. E.g. use incremental deployment every day and full deployment once a week - just to be sure (maybe because they do not trust incremental?)
The problem is that incremental and full deployment do not deploy the same type of content. So the data on source and destination might no longer be the same.
Why can this happen? The reason is that only incremental deployment exports deleted items which is required to ensure that the items also get deleted on the target server.
Consider the following scenario:
- Site A has been created
- Site A gets deployed to the target server
- Site A is deleted
- a full deployment is done
- further actions
- an incremental deployment is done
With step 4 the deleted site will not be exported. The incremental deployment in step 6 will only deploy changes done between step 4 and 6. That means that after step 6 site A still exists on the target server!
You might not even notice this if you are not actively monitoring if the content on source and on target is in sync. Only if content with the same name gets recreated later you will notice it as you will get errors similar to the following:
- "The Web site address "/A" is already in use." or
- "The specified name is already in use. A document cannot have the same name as another document or folder in this document library or folder."
That affects all type of objects (e.g. sites, pages, lists).
To ensure that the target and the source site collection are in sync it is mandatory to use full deployment only once: when doing the initial deployment from source to target. Afterwards you should only use incremental deployment and not add additional full deployment steps. That also means you should avoid situations where content deployment fails to do an incremental due to the fact that the timespan between incremental deployments exceeds the configured retention of the change log (see here for detail).
On the other hand that also means: whenever you see a need to do a full deployment you should do this full deployment into an empty site collection rather than the earlier created site collection that already received content from earlier deployments.