During a migration you sometimes delete a webapplication, create a new one.. attach the migrated content database and delete the webapplication again and so forth..
By doing this you suddenly get errors in the eventlog that looks like this :
Failure trying to synch web application 0ae4e145-5739-4d22-9a55-a05be465fb4e, ContentDB c7e4abe7-a670-4b7d-9350-c6105e4126ba Exception message was A duplicate site ID 1680b2b0-e207-4aac-8dc2-72c9eb33812f(http://sitename) was found. This might be caused by restoring a content database from one server farm into a different server farm without first removing the original database and then running stsadm -o preparetomove. If this is the cause, the stsadm -o preparetomove command can be used with the -OldContentDB command line option to resolve this issue.
Fortunatly the problem solving was done using the first link that popped up in Google and that was the following : Gotcha When You Attach a New Web Application to an Old Content Database in SharePoint 2007 by Grant Earl.