Tag Archives: stsadm

Moving sites and subsites in SharePoint 2007 Portals

Moving sites and subsites within SharePoint 2007

There is a really cool way that you can move a sharepoint site up or down in your hierarchy.

Let’s say you created a sharepoint site your root level (ie http://intranet/website) and six months later you decide it really should be contained under your IT subsite (http://intranet/it/website). You can use the program STSADM to move a site from one location to another.

Steps to move a WSS subsite.

1. Create the new target URL (I created a blank site @ http://intranet/it/website)
2. Fire up the command line
3. CD \”Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN”
4. Export the old URL using the following Command:

stsadm -o export -url http://intranet/website -filename c:\test\backup.cmp

5. Import the file back into Sharepoint using the following command:

stsadm -o import -url http://intranet/it/website -filename c:\test\backup.cmp

That’s it! You have moved your website. You need to check user permissions especially if you are moving to a new subsite!

OTHER COOL STUFF: There is an option to -includeusersecurity while you do the export. You can also choose whether or not to pull all the revision history over with the doc libs or not…

For a full view of options for Export / Import, run the following commands to see all your options:

stsadm -o export

stsadm -o import

Ref : Rob Ashcroft’s

Read-only lock on a SharePoint site collection, or Why can’t I edit anymore ?

For some reason, long-time users were unable to edit list items.  I figured we had a permissions issue, so I popped in to look at the Site Settings — and found that I couldn’t.  A quick trip to Central Administration showed that I was still listed as a Site Collection Administrator, but I had no power at all on the site collection in question.

A quick glance at the logs told me that the server had recently shut down unexpectedly (this is a Hyper-V virtual machine).  Apparently, in the confusion, somehow SharePoint decided to lock the site collection as Read Only.  This can be remedied in one of two ways:

1)  In Central Administration, go to Application Management->SharePoint Site Management->Site collection quotas and locks.  Once you have arrived, select the correct application and site collection, and you will have the opportunity to view and set the lock status of the collection (it most likely will be set to “Read-only”, and you’ll want to move that radio button to “Not locked”).

2)  Fire up stsadm and issue the following command:

stsadm -o setsitelock -url http://myportalsitecollection -lock none