I told you about the WSS 2.0 upgrade that I did yesterday. I had to rely on good old “STSADM’ to extract the data out of the WSS 2.0 environment and restore it in WSS 3.0. For WSS 3.0 and MOSS 2007, STSADM can be be found in the 12-hive bin folder, which is typically located at C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN. For WSS 2.0, STSADM can be found in C:\Program Files\Common Files\Microsoft Shared\web server extenstions\60\BIN.
If you want a straight and fast backup and restore, use the stsadm backup and restore operations.
To back up a site, go to the 12-hive bin folder and type the following command:
stsadm -o backup -url http://mysite -filename myfile.dat
Then to restore your backup, use the following command:
stsadm -o restore -url http://mysite -filename myfile.dat
Notes about using STSADM backup and restore commands:
- Security settings (owners and permission levels) and other user-informated (Created By and Modified By fields) will carry over when you restore it.
- This is faster than using STSADM export/import operations.
- You can only do this on a top-level site. Say you want to get a subsite inside your site-collection, forget it–this operation can only get that subsite by backing up and restoring the whole site collection.
- Point is, backup/restore is not granular. It’s an all-or-nothing backup and restore of a site collection.
If you want to get ‘somewhat’ granular, you can use STSADM export/import command. I say ‘somewhat granular’ because you can’t really drill down to list or library level. But if you have many subsites and you just want to backup and restore (or migrate) a few, then STSADM export/import will be for you.
To export a sub-site, go to the 12-hive bin folder and type the following command:
stsadm -o export-url http://myserver/mysite -filename myfile.dat
Then to “restore your backup”, use the import command:
stsadm -o import-url http://myserver/mysite -filename myfile.dat
Notes about STSADM export/import command:
- Slower than using backup/restore
- Security settings and other user information (Last Modified By, Created By, etc.) do not carry over to the new site. I didn’t had a chance to test this operation with a site that uses some type of approval workflow–I don’t think the “Assigned To” properties will stick with export/import simply based on the observed behavior on standard documents and list libraries.
- Yes, you can export a sub-site so that you don’t have to export the whole site-collection. But you can’t export a library or list or document. You say “why not just template the site and include the content in the template”. You got size-limitations there bud and you won’t be able to ‘template’ a site and include its content if the library or list has too many files.
By the way, I’ve only shown examples using the required parameters -url and -filename. There are other optional paramters to use when using these STSADM commands. For full details, visit the Microsoft page Index of STSADM Operations and properties (Office SharePoint Server)