{"id":503,"date":"2009-05-11T20:52:00","date_gmt":"2009-05-11T20:52:00","guid":{"rendered":"https:\/\/brainlitter.itgroove.net\/2009\/05\/11\/how-to-backup-and-restore-migrate-a-single-sub-site-of-a-sharepoint-site-collection-using-stsadm-o-export-and-import\/"},"modified":"2009-05-11T20:52:00","modified_gmt":"2009-05-11T20:52:00","slug":"how-to-backup-and-restore-migrate-a-single-sub-site-of-a-sharepoint-site-collection-using-stsadm-o-export-and-import","status":"publish","type":"post","link":"https:\/\/regroove.ca\/brainlitter\/2009\/05\/11\/how-to-backup-and-restore-migrate-a-single-sub-site-of-a-sharepoint-site-collection-using-stsadm-o-export-and-import\/","title":{"rendered":"How to backup and restore (migrate) a single sub site (of a SharePoint Site Collection) using STSADM \u2013o export (and import)"},"content":{"rendered":"<div class=\"ExternalClass0160305C5D3E4B49ACE6413AAB70F16F\">\n<p>Ok, long title but I wanted to be as descriptive as possible\u2026 <\/p>\n<p>\u00a0<\/p>\n<p>Reference: <a>http:\/\/msdn.microsoft.com\/en-us\/library\/bb507233.aspx<\/a> <\/p>\n<p>\u00a0<\/p>\n<p>I had need today, as I often do, to help a client &#8216;clean up&#8217; their SharePoint environment. They wanted a new SharePoint site (built on a sound infrastructure, etc. \u2013 my favourite) but wanted to bring across &#8216;some&#8217; of their old content. In this case, there was a sub site that they wanted to bring across in its entirety, with as much version history as possible. The Solution? <strong>STSADM \u2013o export<\/strong> <\/p>\n<p>\u00a0<\/p>\n<p>I&#8217;m going to outline the process here, of the steps I had to perform (and the pratfall I discovered, re: STSADM and it not liking cut and paste from other sources\/references resulting in &#8216;Command Line Error&#8217; being returned \u2013 which in turn, turned out to be because the example syntax I was cutting and pasting from was using the wrong character format for the &#8220;-&#8221; (dash) character. Once I addressed that (thanks, in hints from: <a href=\"http:\/\/weblogs.asp.net\/soever\/archive\/2007\/12\/22\/sharepoint-stsadm-exe-and-the-infamous-quot-command-line-error-quot.aspx\">http:\/\/weblogs.asp.net\/soever\/archive\/2007\/12\/22\/sharepoint-stsadm-exe-and-the-infamous-quot-command-line-error-quot.aspx<\/a>, I was back on my way to finishing the task). So here goes\u2026 <\/p>\n<p>\u00a0<\/p>\n<h1>The Requirement <\/h1>\n<p>Backup a sub site of an existing site collection, with security information and version history retained from one SharePoint Server Farm (not the entire site collection, as you would use \u2013o backup for that, see my &#8216;sandbox&#8217; refresh post <a href=\"\/archive\/2009\/03\/09\/how-to-refresh-a-sharepoint-sandbox-collection-with-production.aspx\">here<\/a>), to another. In my case, I&#8217;m able to bring the Security information across as they exist in the same domain. Note: You will want to avoid the &#8220;-includeusersecurity&#8221; command, if you going beyond the domain. <\/p>\n<p>\u00a0<\/p>\n<h1>The Solution <\/h1>\n<p><span style=\"font-size:12pt\"><span style=\"color:#365f91\"><strong>STSADM \u2013o export<\/strong><\/span> <\/span>followed by <span style=\"color:#365f91;font-size:12pt\"><strong>STSADM \u2013o import<\/strong><\/span> (and the appropriate syntax, see example below). Here is a nice, <a href=\"http:\/\/www.wssdemo.com\/brainlitterarchive\/Lists\/stsadm\/DispForm.aspx?ID=86&amp;Source=http:\/\/www.wssdemo.com\/brainlitterarchive\/Lists\/stsadm\/AllItems.aspx\">syntax overview<\/a> for quick reference. <\/p>\n<p>\u00a0<\/p>\n<h1>The Example <\/h1>\n<p>Note, all commands assume you can use the STSADM command (have it in your path, or have put yourself in the appropriate directory to run it \u2013 <span style=\"color:#365f91\"><em>c:program filescommon filesmicrosoft sharedweb server extensions12bin<\/em><\/span>. <\/p>\n<p>\u00a0<\/p>\n<h2><em>Export Syntax Example <\/em><\/h2>\n<p><span style=\"color:#e36c0a\"><strong>stsadm -o export -url http:\/\/nfn-spsrv:23651\/sites\/nfnentportal\/treaty -filename &#8220;c:swexporttreatysubsitebackup&#8221; -includeusersecurity -versions 4 <\/strong><\/span><\/p>\n<p>\u00a0<\/p>\n<p>The above is indicating that I am: <\/p>\n<ul>\n<li>Exporting the following site: <a href=\"http:\/\/nfn-spsrv:23651\/sites\/nfnentportal\/treaty\"><strong>http:\/\/nfn-spsrv:23651\/sites\/nfnentportal\/treaty<\/strong><\/a> <\/li>\n<li>Exporting to files in the following directory: <strong>c:swexport <\/strong>(Sean Wallbridge Export, my own little folder) <\/li>\n<li>Prefix all files with <strong><em>treatysubsitebackup<\/em><\/strong> <\/li>\n<li>Including User Security <\/li>\n<li>\n<div>Maintaining all version history by choosing option 4 (reference below for all version settings) <\/div>\n<ul>\n<li><em>1\u00a0\u00a0\u00a0Directs the import operation to add new version specifiers to the current file (default). <\/em><\/li>\n<li><em>2\u00a0\u00a0\u00a0Directs the import operation to overwrite the file and all of its versions (delete file, then insert file). <\/em><\/li>\n<li><em>3\u00a0\u00a0\u00a0Directs the import operation to ignore the existing file. <\/em><\/li>\n<li><em>4\u00a0\u00a0\u00a0Directs the import operation to terminate the import operation if file conflicts are detected. <\/em><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u00a0<\/p>\n<p>And the resulting backup looks like this\u2026 <\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"\/brainlitterarchive\/Lists\/Photos\/051209_0352_Howtobackup1.png\"> <\/p>\n<p>\u00a0<\/p>\n<h2><em>Import Syntax Example <\/em><\/h2>\n<p>Cool, I&#8217;ve got my site exported; now it&#8217;s time to plunk it into the new site. The first step is to create an empty sub site, using the standard approach (note, you do not need to create the initial site, I just like to for my own nervous reasons ;): <\/p>\n<p>\u00a0<\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"\/brainlitterarchive\/Lists\/Photos\/051209_0352_Howtobackup2.png\"> <\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"\/brainlitterarchive\/Lists\/Photos\/051209_0352_Howtobackup3.png\"> <\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"\/brainlitterarchive\/Lists\/Photos\/051209_0352_Howtobackup4.png\"> <\/p>\n<p>\u00a0<\/p>\n<p>Finally, run the import command (<a href=\"http:\/\/www.wssdemo.com\/brainlitterarchive\/Lists\/stsadm\/DispForm.aspx?ID=99&amp;Source=http:\/\/www.wssdemo.com\/brainlitterarchive\/Lists\/stsadm\/AllItems.aspx\">quick reference here<\/a>)\u2026 <\/p>\n<p><span style=\"color:#e36c0a\"><strong>stsadm -o import -url http:\/\/nfn-spsrv:23649\/treaty\/treatyarchive -filename &#8220;c:swexporttreatysubsitebackup.cmp&#8221; -includeusersecurity -updateversions 2 <\/strong><\/span><\/p>\n<p>\u00a0<\/p>\n<p>Check your log file when it is done, to ensure it went successfully. <\/p>\n<p><strong>Notes: <\/strong><\/p>\n<ul>\n<li>In the Import command, even though we didn&#8217;t specify a file extension with the Export command, you&#8217;ll need to add &#8216;.cmp&#8217; to the end of your Import filename path <\/li>\n<li>\n<div>Also, the versions flag is different, it is &#8216;-updateversions&#8217; and the numbered option to choose, will be different, depending on your scenario (below is a quick reference): <\/div>\n<ul>\n<li><em>1 &#8211; Add new versions to the current file (default) <\/em><\/li>\n<li><em>2 &#8211; Overwrite the file and all its versions (delete then insert) <\/em><\/li>\n<li><em>3 &#8211; Ignore the file if it exists on the destination] <\/em><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Ok, long title but I wanted to be as descriptive as possible\u2026 \u00a0 Reference: http:\/\/msdn.microsoft.com\/en-us\/library\/bb507233.aspx \u00a0 I had need today, as I often do, to help a client &#8216;clean up&#8217; their SharePoint environment. They wanted a new SharePoint site (built on a sound infrastructure, etc. \u2013 my favourite) but wanted to bring across &#8216;some&#8217; of &hellip; <a href=\"https:\/\/regroove.ca\/brainlitter\/2009\/05\/11\/how-to-backup-and-restore-migrate-a-single-sub-site-of-a-sharepoint-site-collection-using-stsadm-o-export-and-import\/\"><\/a><\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":"","_jetpack_memberships_contains_paid_content":false},"categories":[337,14,339],"tags":[],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to backup and restore (migrate) a single sub site (of a SharePoint Site Collection) using STSADM \u2013o export (and import) - Brainlitter - Inside the mind of Sean Wallbridge<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/regroove.ca\/brainlitter\/2009\/05\/11\/how-to-backup-and-restore-migrate-a-single-sub-site-of-a-sharepoint-site-collection-using-stsadm-o-export-and-import\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to backup and restore (migrate) a single sub site (of a SharePoint Site Collection) using STSADM \u2013o export (and import) - Brainlitter - Inside the mind of Sean Wallbridge\" \/>\n<meta property=\"og:description\" content=\"Ok, long title but I wanted to be as descriptive as possible\u2026 \u00a0 Reference: http:\/\/msdn.microsoft.com\/en-us\/library\/bb507233.aspx \u00a0 I had need today, as I often do, to help a client &#8216;clean up&#8217; their SharePoint environment. They wanted a new SharePoint site (built on a sound infrastructure, etc. \u2013 my favourite) but wanted to bring across &#8216;some&#8217; of &hellip;\" \/>\n<meta property=\"og:url\" content=\"http:\/\/regroove.ca\/brainlitter\/2009\/05\/11\/how-to-backup-and-restore-migrate-a-single-sub-site-of-a-sharepoint-site-collection-using-stsadm-o-export-and-import\/\" \/>\n<meta property=\"og:site_name\" content=\"Brainlitter - Inside the mind of Sean Wallbridge\" \/>\n<meta property=\"article:published_time\" content=\"2009-05-11T20:52:00+00:00\" \/>\n<meta name=\"author\" content=\"Sean Wallbridge\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sean Wallbridge\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"http:\/\/regroove.ca\/brainlitter\/2009\/05\/11\/how-to-backup-and-restore-migrate-a-single-sub-site-of-a-sharepoint-site-collection-using-stsadm-o-export-and-import\/\",\"url\":\"http:\/\/regroove.ca\/brainlitter\/2009\/05\/11\/how-to-backup-and-restore-migrate-a-single-sub-site-of-a-sharepoint-site-collection-using-stsadm-o-export-and-import\/\",\"name\":\"How to backup and restore (migrate) a single sub site (of a SharePoint Site Collection) using STSADM \u2013o export (and import) - Brainlitter - Inside the mind of Sean Wallbridge\",\"isPartOf\":{\"@id\":\"https:\/\/regroove.ca\/brainlitter\/#website\"},\"datePublished\":\"2009-05-11T20:52:00+00:00\",\"dateModified\":\"2009-05-11T20:52:00+00:00\",\"author\":{\"@id\":\"https:\/\/regroove.ca\/brainlitter\/#\/schema\/person\/74e1c0def190f181c1394c2b6d883e77\"},\"breadcrumb\":{\"@id\":\"http:\/\/regroove.ca\/brainlitter\/2009\/05\/11\/how-to-backup-and-restore-migrate-a-single-sub-site-of-a-sharepoint-site-collection-using-stsadm-o-export-and-import\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/regroove.ca\/brainlitter\/2009\/05\/11\/how-to-backup-and-restore-migrate-a-single-sub-site-of-a-sharepoint-site-collection-using-stsadm-o-export-and-import\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/regroove.ca\/brainlitter\/2009\/05\/11\/how-to-backup-and-restore-migrate-a-single-sub-site-of-a-sharepoint-site-collection-using-stsadm-o-export-and-import\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Brainlitter\",\"item\":\"https:\/\/regroove.ca\/brainlitter\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to backup and restore (migrate) a single sub site (of a SharePoint Site Collection) using STSADM \u2013o export (and import)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/regroove.ca\/brainlitter\/#website\",\"url\":\"https:\/\/regroove.ca\/brainlitter\/\",\"name\":\"Brainlitter - Inside the mind of Sean Wallbridge\",\"description\":\"Dad. Husband. Drummer. Learner of Things.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/regroove.ca\/brainlitter\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/regroove.ca\/brainlitter\/#\/schema\/person\/74e1c0def190f181c1394c2b6d883e77\",\"name\":\"Sean Wallbridge\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/regroove.ca\/brainlitter\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/adf8cea6291c39d166616f2148d919a6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/adf8cea6291c39d166616f2148d919a6?s=96&d=mm&r=g\",\"caption\":\"Sean Wallbridge\"},\"url\":\"https:\/\/regroove.ca\/brainlitter\/author\/swallbridge\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to backup and restore (migrate) a single sub site (of a SharePoint Site Collection) using STSADM \u2013o export (and import) - Brainlitter - Inside the mind of Sean Wallbridge","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/regroove.ca\/brainlitter\/2009\/05\/11\/how-to-backup-and-restore-migrate-a-single-sub-site-of-a-sharepoint-site-collection-using-stsadm-o-export-and-import\/","og_locale":"en_US","og_type":"article","og_title":"How to backup and restore (migrate) a single sub site (of a SharePoint Site Collection) using STSADM \u2013o export (and import) - Brainlitter - Inside the mind of Sean Wallbridge","og_description":"Ok, long title but I wanted to be as descriptive as possible\u2026 \u00a0 Reference: http:\/\/msdn.microsoft.com\/en-us\/library\/bb507233.aspx \u00a0 I had need today, as I often do, to help a client &#8216;clean up&#8217; their SharePoint environment. They wanted a new SharePoint site (built on a sound infrastructure, etc. \u2013 my favourite) but wanted to bring across &#8216;some&#8217; of &hellip;","og_url":"http:\/\/regroove.ca\/brainlitter\/2009\/05\/11\/how-to-backup-and-restore-migrate-a-single-sub-site-of-a-sharepoint-site-collection-using-stsadm-o-export-and-import\/","og_site_name":"Brainlitter - Inside the mind of Sean Wallbridge","article_published_time":"2009-05-11T20:52:00+00:00","author":"Sean Wallbridge","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Sean Wallbridge","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"http:\/\/regroove.ca\/brainlitter\/2009\/05\/11\/how-to-backup-and-restore-migrate-a-single-sub-site-of-a-sharepoint-site-collection-using-stsadm-o-export-and-import\/","url":"http:\/\/regroove.ca\/brainlitter\/2009\/05\/11\/how-to-backup-and-restore-migrate-a-single-sub-site-of-a-sharepoint-site-collection-using-stsadm-o-export-and-import\/","name":"How to backup and restore (migrate) a single sub site (of a SharePoint Site Collection) using STSADM \u2013o export (and import) - Brainlitter - Inside the mind of Sean Wallbridge","isPartOf":{"@id":"https:\/\/regroove.ca\/brainlitter\/#website"},"datePublished":"2009-05-11T20:52:00+00:00","dateModified":"2009-05-11T20:52:00+00:00","author":{"@id":"https:\/\/regroove.ca\/brainlitter\/#\/schema\/person\/74e1c0def190f181c1394c2b6d883e77"},"breadcrumb":{"@id":"http:\/\/regroove.ca\/brainlitter\/2009\/05\/11\/how-to-backup-and-restore-migrate-a-single-sub-site-of-a-sharepoint-site-collection-using-stsadm-o-export-and-import\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/regroove.ca\/brainlitter\/2009\/05\/11\/how-to-backup-and-restore-migrate-a-single-sub-site-of-a-sharepoint-site-collection-using-stsadm-o-export-and-import\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/regroove.ca\/brainlitter\/2009\/05\/11\/how-to-backup-and-restore-migrate-a-single-sub-site-of-a-sharepoint-site-collection-using-stsadm-o-export-and-import\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Brainlitter","item":"https:\/\/regroove.ca\/brainlitter\/"},{"@type":"ListItem","position":2,"name":"How to backup and restore (migrate) a single sub site (of a SharePoint Site Collection) using STSADM \u2013o export (and import)"}]},{"@type":"WebSite","@id":"https:\/\/regroove.ca\/brainlitter\/#website","url":"https:\/\/regroove.ca\/brainlitter\/","name":"Brainlitter - Inside the mind of Sean Wallbridge","description":"Dad. Husband. Drummer. Learner of Things.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/regroove.ca\/brainlitter\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/regroove.ca\/brainlitter\/#\/schema\/person\/74e1c0def190f181c1394c2b6d883e77","name":"Sean Wallbridge","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/regroove.ca\/brainlitter\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/adf8cea6291c39d166616f2148d919a6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/adf8cea6291c39d166616f2148d919a6?s=96&d=mm&r=g","caption":"Sean Wallbridge"},"url":"https:\/\/regroove.ca\/brainlitter\/author\/swallbridge\/"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/posts\/503"}],"collection":[{"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/comments?post=503"}],"version-history":[{"count":0,"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/posts\/503\/revisions"}],"wp:attachment":[{"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/media?parent=503"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/categories?post=503"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/tags?post=503"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}