Some of you during a restor (STSADM restore that is) might have come across this erorr:
Exception from HRESULT: 0x80040E2F
This HRESULT simply means, “Violation of PRIMARY KEY constraint “, which generally means one thing, you have entries in the database for this site previously, possibly orphaned, that is preventing the restore to continue.
Sometimes a simple -overwrite after the restore command would work, but sometimes the problem isn’t that there was orphaned data to begin with, but rather “New” data related to the site added outside of the restore, that then causes the restore to fail.
The reason in this case, may be due to the fact that while the restore is progressing, the site isn’t locked and therefore users accessing the site is causing the duplicate entries.
2 easy ways to fix this:
Lock the site from Central Admin
Switch off the site from IIS and remember to start it once the restore is complete.
This should fix your problem. If you are still having this issue, let me know and ill see if i can help.