Exporting web, and importing to new site collection with same URL
All, We would like to break out some webs into new site collections, but keep the same URL. I thought this could be done by using managed paths, but so far, not working, wondering if I am missing something or if anyone did similar and has suggestions: Website used in this example: http://mysite/sites/cet/subsite1 1. changed web url of subsite1 to subsite1_old 2. exported subsite1 via STSADM export 3. created managed path (tried both explicit and implicit), but for this example, explicit (sites/cet/subsite1). 4. Created new site collection in managed path (blank template). Message was the site collection was created sucessfully. This is where I tried to get to new site collection, but url came back not found. I tried ISSRESET on all servers, still not working. I figured I would try to finish, but that didn't help... 5. import via STSADM import -url http://mysite/sites/cet/subsite1. The import was succesful, but still 'not found'. Has anyone tried this or know something I must do...? Our site collection is huge and we are trying to break it out...
June 16th, 2010 5:13pm

maybe I am missing something but what is your address of your managed path? How is that any different from your original path?
Free Windows Admin Tool Kit Click here and download it now
June 16th, 2010 6:33pm

sorry, should have been more clear, when you put in managed path you don't use full URL, so sites/cet/subsite1 would be the same url as the former web with url of http://mysite/sites/cet/subsite1
June 16th, 2010 7:25pm

I think you need to take a look at managed paths and how they are used and what the restrictions are (Only Site Collections can be created under a managed path, Sites are created below the Site Collection Also there is a big diffrence in the typoes of managed paths as you will see... SPSites have one very important feature—all SPWebs in an SPSite must be stored in the same Content Database. This is key to how we figure out what database user data is stored in. SPSites are limited to being created only where a managed path is defined! For example, "(root)" is one of the default managed paths you see when creating a new web application in SharePoint (visit Central Administration -> Application Management -> Define Managed Paths). This means you can create one site collection at the root of the web app—in our example, this means you can have a site collection at http://foo.com. This is an explicit managed path as it means you can create only one site collection at the exact location specified. Another default managed path you see is "sites"—which is a wildcard managed path. This allows for unlimited number of site collections to be created directly under the provided path (it is important to note that a site collection, and thus an SPWeb, cannot be created at this explicit url). This means I can create site collection (and only SPSites, not SPWebs) directly under this url (http://foo/sites/foo). This means that any additional path in the given URL is an spweb (created from the root web of this spsite). So in our example, we can split the incoming URL into four pieces to quickly look up the information: "http://ww.foo.com" + "/Sites" + "/Foo" + "/bar/foobar" (Web Application) + (managed path) + (SPSite) + (Web/SubWeb) The rest of the Article by Zach http://sharepoint.microsoft.com/blogs/zach/Lists/Posts/Post.aspx?ID=30 Cheers, -IvanIvan Sanders My LinkedIn Profile, My Blog, @iasanders.
Free Windows Admin Tool Kit Click here and download it now
June 16th, 2010 9:36pm

I totally agree with what Ivan said. That is exactly how managed paths work
June 16th, 2010 9:50pm

I think I understand, so, are you saying that I can only import the subweb (SPWeb) as a subweb of the new site collection (SPSite) in the new URL? I thought admins exported subwebs and imported them into site collections all the time and the only twist I was adding was keeping the URL the same with a managed path. thanks!
Free Windows Admin Tool Kit Click here and download it now
June 16th, 2010 10:03pm

ok, to take this further, I've seen a lot of posts and blogs saying that it is possible to export subsite and then import on new site collection: http://sharepointkb.org/Convert_a_Subweb_to_a_Site_Collection is an example. So, why wouldn't I be able to create a managed path, then new site collection (blank template) at http://mysite/sites/cet/subsite1 and then import the subwebs I exported? The site collection is there. Can I only restore to a subsite of site collection (example: http://mysite/sites/cet/subsite1 ?/subsite2
June 16th, 2010 10:24pm

I figured this out. It works. I just needed to run STSADM execadmsvcsjob and iisreset on all the servers in the farm.. Its always something! here is the script in case it is helpful to anyone... @ECHO OFF echo. REM ---The URL of the site you wish to 1) export 2)temporarily move 3)create managed path 4)import backup to--- SET weburl=http://mysite/sites/subsite1/subsite2 REM ---The new URL of the old site, so that it is hidden from view--- SET renameto=subsite2_hidden REM ---The name of the backup file--- SET backupfilename=subsite2_full REM ---The name of the corresponding logfile--- SET logfilename=subsite2_FULL.txt REM ---New Site Collection Owner email--- SET owneremail=yourname@yourplace.com REM ---New Site Collection Owner NT account--- SET ownerlogin=yourplace\elmo14 REM ********** DO NOT CHANGE ANYTHING BELOW THIS LINE ********** SET logfile=\\yourfileshare\logfiles\%logfilename% SET backupfile=\\yourfileshare\ProductionSiteMoves\%backupfilename% REM ------ CREATE FULL EXPORT - ALL VERSIONS and USER SECURITY ------- ECHO Start of move process: %date% %time% >> %logfile% echo. >> %logfile% echo Start of backup: %date% %time% >> "%logfile%" stsadm -o export -url "%weburl%" -filename "%backupfile%" -includeusersecurity -versions 4 -nofilecompression echo End of backup: %date% %time% >> %logfile% echo. >> %logfile% REM ------ RENAME ORIGINAL WEB TO HIDE FROM VIEW ------- echo Start of web rename: %date% %time% >> "%logfile%" stsadm -o renameweb -url "%weburl%" -newname "%renameto%" echo End of web rename: %date% %time% >> %logfile% echo. >> %logfile% REM -------CREATE A MANAGED PATH FOR THE NEW TOP LEVEL SITE ------- echo Creating manged path: %date% %time% >> "%logfile%" stsadm -o addpath -url "%weburl%" -type explicitinclusion echo End of managed path: %date% %time% >> %logfile% echo. >> %logfile% REM ------Run execadmsvcsjob and iisreset------ stsadm execadmsvcsjob iisreset REM ------CREATE AN EMPTY SITE WITH A DEFAULT SITE TEMPLATE (note that if you don't specify a template you have to manually activate the required features)------ echo Creating new site collection in new managed path: %date% %time% >> "%logfile%" stsadm -o createsite -url "%weburl%" -owneremail "%owneremail%" -ownerlogin "%ownerlogin%" -sitetemplate "SPSTOPIC#0" echo End of creating site collection in new managed path: %date% %time% >> %logfile% echo. >> %logfile% REM ------ IMPORT SUBWEB TO NEW SITE COLLECTION - ALL VERSIONS and USER SECURITY ------- echo Start of restore to new site collection: %date% %time% >> "%logfile%" stsadm -o import -url "%weburl%" -filename "%backupfile%" -includeusersecurity -nofilecompression echo End of restore to new site collection: %date% %time% >> "%logfile%" echo. >> %logfile% ECHO End of move process: %date% %time% >> "%logfile%" PAUSE
Free Windows Admin Tool Kit Click here and download it now
June 17th, 2010 5:35pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics