NOTE:
When I post links, I don't have reputation, so I replaced "http" with "hxxp"...just change the xx's to tt's :p
This works for me every day:
A little bit about my setup: When I'm migrating sites, it's usually going between servers.
If it's all going to be on the same server, even easier.
If you ARE going between servers, you just have to do the export on the source server, and then create the new content database/managed path/blank site collection, and run the import on the destination server.
At any rate, run this, substituting your URL and file path to where you want to back up at:
stsadm -o export -url hxxp://server/sites/site -filename Z:\SPBackups\sites\site\sites_to_backup.cmp -includeusersecurity -nofilecompression -versions 4
Now, go to Central Administration > Application Management.
If this site will be in a new content database, create that.
Now go back to Application Management, create a new managed path if you need to.
Then, "Create Site collection".
Choose the "Blank Site Template" (or whatever the exact wording is, i forget). Click create, and wait for it to finish creating a blank site collection for you.
After it has been created, DO NOT browse to the site.
After it has been created, DO NOT browse to the site.
After it has been created, DO NOT browse to the site.
After it has been created, DO NOT browse to the site.
Run this in command prompt:
stsadm -o import -url hxxp://server2/newsite -filename C:\SPBackups\sites\site\sites_to_backup.cmp -includeusersecurity -nofilecompression
It should import everything as-is, using the same template that was used on the source server.
Now, browse to your new site collection. Everything should come up fine, with the exception of some broken links.
To fix this, go to http://stsadm.blogspot.com. Install his custom STSADM extensions. The one you want is located here: hxxp://stsadm.blogspot.com/2009/01/replacing-navigation-urls-using-stsadm.html.
You'll run this command:
stsadm -o gl-replacenavigationurls –url "hxxp://server/newsitecollection" –searchstring "hxxp://server/oldsitecollection/oldsubsite" –replacestring "hxxp://server/newsitecollection" –scope Site
That command will go to the new site collection (hxxp://server/newsitecollection) and search within the entire site for the string "hxxp://server/oldsitecollection/oldsubsite", and replace that with "hxxp://server/newsitecollection". So any links that were pointing to the old site (document libraries, lists, etc) will be modified to go to the new site collection's URL.
Hope this helps!
PS - You can also use the extension that Gary has for gl-convertsubsitetositecollection...works wonders. But this is generally what I use, since it is not too complicated.