MOSS - Common Issue - Incremental deployment fails with "The changeToken refers to a time before the start of the current change log."
I have seens this problem a couple of times in the past: sometimes when running incremental content deployment the deployment job fails with the following error message
The changeToken refers to a time before the start of the current change log.
To make a long story short: to resolve the problem you should do a full deployment into an empty database. It is not recommended to run full deployment into the previously used database as the full deployment will not perform delete operations of items that have been deleted in the source database but still exist in the destination database. It will also not reliably work if items have been moved on the source database to other places after the last successful incremental deployment has been used.
Why does this problem occur? This can happen mainly for three different reasons:
A) The timespan since the last incremental deployment job is too long
MOSS stores the change token of the last successful incremental deployment inside the properties of the incremental content deployment job. When a new incremental deployment is run it compares the change token in theses settings with the entries in the change log.
Per default the change log is configured to keep changes for 15 days. If the timespan between two incremental deployment job exceeds this timespan then the change log does not contain entries from before the change token and incremental deployment will not start to prevent deploying only parts of the required content.
A solution for this would be to increase the timespan the change log should be preserved. This can done using the following steps:
Central Administration - Application Management - Web Application General Settings - (choose the desired website) - Change Log
B) The source database has been overwritten with a backup
When a database is restored through STSADM -o restore or using SQL backup and STSADM -o addcontentdb the change log is cleared.
Incremental deployment will not work in this case and you have to do a full deployment to synchronize the content with the destination database.
C) No changes have happend on the source server for a long time
As mentioned in A) the change log will be used to determine the items that need to be deployed. Per default changes are preserved for 15 days in the change log. So if no changes have been done for 15 days the change log will become empty.
Two possible solutions exist:
- Increase the timespan the change log should be preserved. This can done using the following steps:
Central Administration - Application Management - Web Application General Settings - (choose the desired website) - Change Log
- Ensure that at least one item is modified within the configured timespan
D) The source database has been merged with a different site collection
After merging two content databases using stsadm -o mergecontentdbs the EventCache table will be empty. This is similar to problem B) listed above.
Incremental deployment will not work in this case and you have to do a full deployment to synchronize the content with the destination database.