stsadm import / export missing content

in sharepoint v3, the tool stsadm has an operation for importing and exporting sites and/or webs. it is the replacement for smigrate from v2.

so say you want to move a web to a different site collection, you would need to use this tool.

unfortunately there seems to be a bug in the import / export operations.

it's a rather nasty bug too that will move most of your content but not everything, making it extremely difficult to detect.

for example you might have a document library with 20 files but only 5 of them get moved, all without any obvious notices in the log files.

the only way you would even know that it was not a complete import is if you knew the contents you were expecting to show up.

when exporting content you should use the following switches:

stsadm -o export -url <url> -filename <filename> -includeusersecurity -versions 4

when importing that content you should try using:

stsadm -o import -url <url> -filename <filename> -includeusersecurity

 

this has worked for me and my export / imports have been much more successful then without those switches, but you should still try to verify this for yourself as well.

if you're simply move a site collection to a different location you can use stsadm backup / restore which seems to be a little bit more reliable at this point.

a bug has been filed for this problem and the wheels are in motion to help fix this thing

UPDATE: apparently this is not a bug and is by design. if there are documents which are not a published major version or draft copies, they will not be backed up unless you use the -versions 4 switch. it's likely that in almost all cases you will want to use this switch to ensure all content is migrated.