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.

Comments

  • Anonymous
    October 15, 2007
    Hi,  After a big migration from SPS 2003 to MOSS, we were reorganizing the Site structure and   many files were missing following the STSADM export/import. By just adding the -versions 4, all files were transfered, no one missing you save me a lot of time. Thank you. Guillermo

  • Anonymous
    April 10, 2008
    I have been trying to use export / import to move a team site underneath the portal structure.  I get no warnings or errors, but also get no new site.  Is it possible to move a WSS site to MOSS?  I've used both version and security switches with no difference in the outcome.

  • Anonymous
    April 13, 2008
    @kctElgin hi, i have the same issue/feature. i you use the incluseusersecurity parameter in import, the sourcesite will be overwritten whatever target site you choose. if you have a solution for this, please contact me.

  • Anonymous
    July 27, 2010
    Use STSADM –o import and STSADM –o export works for backing up an individual subsite though it does not keep any of the Metadata. this means that it will not copy lastModefiedby etc .. SharePoint treats this command almost like a copy on a file system. stsadm.exe -o export -url http://localhost/en/momo -filename C:momosubsite.cab -includeusersecurity -versions 3 -overwrite stsadm.exe -o import -url http://localhost/en/newMomo -filename C:momosubsite.cab -includeusersecurity good measure to take is to use relative paths for refrencing documents, images, and pages on the sites because import/export is similar to copy/paste using relative paths will save time of updating site after an import good practice little maintenance