{"id":3600,"date":"2012-03-22T18:11:39","date_gmt":"2012-03-22T10:11:39","guid":{"rendered":"http:\/\/www.sharepointboost.com\/blog\/?p=3600"},"modified":"2023-07-31T11:39:57","modified_gmt":"2023-07-31T03:39:57","slug":"how-to-use-sharepoint-2010-management-shell-for-backup-and-restore","status":"publish","type":"post","link":"https:\/\/www.boostsolutions.com\/blog\/how-to-use-sharepoint-2010-management-shell-for-backup-and-restore\/","title":{"rendered":"How to Use SharePoint 2010 Management Shell for Backup and Restore?"},"content":{"rendered":"<p>How do you backup and restore a site collection in SharePoint 2010? Usually, administrators are considered the only option, but in fact SharePoint 2010 also provides a relatively easy and convenient way to perform these operations with several simple PowerShell commands.<\/p>\n<p>When you are Backup and Restore a site collection, you are actually performing 3 separate operations:<\/p>\n<ol>\n<li>Backup the site to a single file.<\/li>\n<li>Create a new site collection as the target site collection.<\/li>\n<li>Do the Restore.<\/li>\n<\/ol>\n<p><strong>1. <\/strong><strong>Backup SharePoint site collection<\/strong><\/p>\n<p>A. Click &#8220;<strong>Start<\/strong>&#8221; enter &#8220;<strong>All Programs<\/strong>.&#8221;<\/p>\n<p>B.?Select &#8220;<strong>SharePoint 2010 Management Shell<\/strong>&#8220;(Run as Administrator).<\/p>\n<p>C. Execute the following command as shown in figure 1:<\/p>\n<p><strong> backup-SPSite http:\/\/kongyang:8081 -Path C:\\8081.bak<\/strong><\/p>\n<p><strong><br \/>\n<\/strong><\/p>\n<p><strong><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2012\/03\/Pic1-How-to-use-SharePoint-2010-Management-Shell-for-Backup-and-Restore.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-3601 alignnone\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2012\/03\/Pic1-How-to-use-SharePoint-2010-Management-Shell-for-Backup-and-Restore.png\" alt=\"\" width=\"561\" height=\"274\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2012\/03\/Pic1-How-to-use-SharePoint-2010-Management-Shell-for-Backup-and-Restore.png 561w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2012\/03\/Pic1-How-to-use-SharePoint-2010-Management-Shell-for-Backup-and-Restore-300x146.png 300w\" sizes=\"(max-width: 561px) 100vw, 561px\" \/><\/a><\/strong><\/p>\n<p><strong><!--more--><\/strong><\/p>\n<p style=\"text-align: center;\"><strong>Figure 1<\/strong><\/p>\n<p>D. The backup file <strong>8081.bak<\/strong> has been generated in the Local Desk (C:) .<\/p>\n<p><strong><span style=\"text-decoration: underline;\">Note<\/span><\/strong>: http:\/\/kongyang:8081 is the name of the web application to be backed up.<\/p>\n<p><strong>2. <\/strong><strong>Create Target Site Collection<\/strong><\/p>\n<p>SharePoint site collection is based on the web application, so we need to create a web application for the target site collection. And don&#8217;t forget to take attention to the Database Server name and Database name.<\/p>\n<p>A. Create a web application (As shown in the Figure 2)<\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2012\/03\/Pic2-How-to-use-SharePoint-2010-Management-Shell-for-Backup-and-Restore.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-3603 alignnone\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2012\/03\/Pic2-How-to-use-SharePoint-2010-Management-Shell-for-Backup-and-Restore.png\" alt=\"\" width=\"561\" height=\"798\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2012\/03\/Pic2-How-to-use-SharePoint-2010-Management-Shell-for-Backup-and-Restore.png 561w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2012\/03\/Pic2-How-to-use-SharePoint-2010-Management-Shell-for-Backup-and-Restore-210x300.png 210w\" sizes=\"(max-width: 561px) 100vw, 561px\" \/><\/a><\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2012\/03\/Pic3-How-to-use-SharePoint-2010-Management-Shell-for-Backup-and-Restore.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3604\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2012\/03\/Pic3-How-to-use-SharePoint-2010-Management-Shell-for-Backup-and-Restore.png\" alt=\"\" width=\"561\" height=\"792\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2012\/03\/Pic3-How-to-use-SharePoint-2010-Management-Shell-for-Backup-and-Restore.png 561w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2012\/03\/Pic3-How-to-use-SharePoint-2010-Management-Shell-for-Backup-and-Restore-212x300.png 212w\" sizes=\"(max-width: 561px) 100vw, 561px\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><strong>Figure 2<\/strong><\/p>\n<p>B. Create site collection for the web application<\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2012\/03\/Pic4-How-to-use-SharePoint-2010-Management-Shell-for-Backup-and-Restore.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3605\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2012\/03\/Pic4-How-to-use-SharePoint-2010-Management-Shell-for-Backup-and-Restore.png\" alt=\"\" width=\"561\" height=\"341\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2012\/03\/Pic4-How-to-use-SharePoint-2010-Management-Shell-for-Backup-and-Restore.png 561w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2012\/03\/Pic4-How-to-use-SharePoint-2010-Management-Shell-for-Backup-and-Restore-300x182.png 300w\" sizes=\"(max-width: 561px) 100vw, 561px\" \/><\/a><\/p>\n<p><strong>3. <\/strong><strong>Restore site collection<\/strong><\/p>\n<p>A. Click &#8220;<strong>Start<\/strong>&#8220;<strong> enter <\/strong>&#8220;<strong>All Programs.<\/strong>&#8221;<\/p>\n<p>B. Select &#8220;<strong>SharePoint 2010 Management Shell<\/strong>&#8220;(Run as Administrator).<\/p>\n<p>C. Execute the following command as shown in Figure 3:<br \/>\n<strong>Restore-SPSite http:\/\/kongyang:2345 -Path C:\\8081.bak -Force -DatabaseServer KONGYANG -DatabaseName wss_content_8081backup<\/strong><\/p>\n<p>D. Input &#8220;<strong>A<\/strong>,&#8221; then press &#8220;<strong>Enter<\/strong>,&#8221; will execute the restore.<\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2012\/03\/Pic5-How-to-use-SharePoint-2010-Management-Shell-for-Backup-and-Restore.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3606\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2012\/03\/Pic5-How-to-use-SharePoint-2010-Management-Shell-for-Backup-and-Restore.png\" alt=\"\" width=\"561\" height=\"275\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2012\/03\/Pic5-How-to-use-SharePoint-2010-Management-Shell-for-Backup-and-Restore.png 561w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2012\/03\/Pic5-How-to-use-SharePoint-2010-Management-Shell-for-Backup-and-Restore-300x147.png 300w\" sizes=\"(max-width: 561px) 100vw, 561px\" \/><\/a><\/p>\n<p><strong><span style=\"text-decoration: underline;\">Note<\/span><\/strong>: <strong>KONGYANG<\/strong> is the name of Database Server. <strong>wss_content_8081backup<\/strong> is the name of Database.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How do you backup and restore a site collection in SharePoint 2010? Usually, administrators are considered the only option, but in fact SharePoint 2010 also provides a relatively easy and convenient way to perform these operations with several simple PowerShell commands. When you are Backup and Restore a site collection, you are actually performing 3 [&hellip;]<\/p>\n","protected":false},"author":41,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[461,125,480],"tags":[328,327,326],"_links":{"self":[{"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/3600"}],"collection":[{"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=3600"}],"version-history":[{"count":10,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/3600\/revisions"}],"predecessor-version":[{"id":9248,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/3600\/revisions\/9248"}],"wp:attachment":[{"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=3600"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=3600"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=3600"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}