This is a pretty basic procedure, but I have seen it gone wrong
so many times I thought it worthy of a quick blog post.
The process is as follows:
- Take a SQL backup of an existing content database
- Restore SQL backup to new server
- Create managed paths to match the structure on the previous
server ** important (see below)
- Run the following stsadm command to attach the content db.
- stsadm -o addcontentdb -url [WebAppURL] -databasename
[RestoredDBName]
**
Step number 3 is where the problems all occur. When the
addcontentdb command is run, the configuration database will be
populated with all the sites in the content database. They will be
populated according to the path structure in the previous server.
Therefore your sites will not be restored if the managed paths do
not exist.