4

I have a big corporate portal (on SharePonit 2010) and now I want to make a copy of it for my tests. So the problem is how make a copy of portal (maybe without documemts) from http://server1 to http://server2 ?

1
  • How about the users and the user groups and the respective permissions do they get copied over as well?
    – user41931
    Apr 29, 2015 at 20:30

5 Answers 5

7

To back up a site collection, you must use the following stsadm command.

stsadm –o backup –url <URL of the site collection> -filename <Name of the backup file>

To restore a site collection, you must use the following Stsadm command.

stsadm –o restore –url <URL of the site collection> -filename <Name of the backup file> -overwrite

If you want to copy the whole web application follow these steps

  1. Take the backup of the content database of web application in server1
  2. create a web application on server2
  3. restore the content database in server2
  4. detach the content database from the web application created on server2
  5. attach the new content database to new web application.

This will copy all the documents in document library. This method supports more than 2TB content database size.

8
  • Will this solution copy site collection with all content? (documents etc.) Is there a way to make copy with empty libraries? (because there are a lot of documents and other things, about 100 Gb).
    – Nana
    Nov 28, 2012 at 10:06
  • yes this solution will copy everything.it will copy all the documents also.how many site collections are there in web application? do you want to copy documents also to the new site collection?
    – user270014
    Nov 28, 2012 at 10:17
  • >how many site collections are there in web application a lot.. >do you want to copy documents also to the new site collection? If it's real I want to copy site collection with library (but empty, without documents)
    – Nana
    Nov 28, 2012 at 10:36
  • Do you want copy only one site collection or all the site collections (whole web application) to another server?
    – user270014
    Nov 28, 2012 at 10:43
  • Whole web application
    – Nana
    Nov 28, 2012 at 10:47
2

There are three ways to do this

Central admin:

go to backup and restore section Here you can take of site collection and restore from backup

stsadm command

To back up a site collection, you must use the following stsadm command.

stsadm –o backup –url "URL of the site collection" -filename "Name of the backup file"

To restore a site collection, you must use the following Stsadm command.

stsadm –o restore –url "URL of the site collection" -filename "Name of the backup file" -overwrite

powershell command

Backup-SPSite -Identity "SiteCollectionGUIDorURL" -Path "BackupFile" [-Force] [-NoSiteLock] [-UseSqlSnapshot] [-Verbose]

is the ID or URL for the site collection you want to back up. is the path to where the backup file is located.

If you want to overwrite a previously used backup file, use the Force parameter. You can use the NoSiteLock parameter to keep the read-only lock from being set on the site collection while it is being backed up. However, using this parameter can enable users to change the site collection while it is being backed up and could lead to possible data corruption during backup. To display the site collection GUID or URL at the Windows PowerShell command prompt, type the following command:

Get-SPSite | format-list -property id,url

Restore-SPSite -Identity "SiteCollectionURL" -Path "Backup file" [-DatabaseServer "DatabaseServerName"] [-DatabaseName "ContentDatabaseName"] [-HostHeader "Host header"] [-Force] [-GradualDelete] [-Verbose]

is URL for the site collection you want to restore. is name of the database server where the site collection resides. is the name of the content database.

If you want to restore the site collection to a specific content database, use the DatabaseServer and DatabaseName parameters to specify the content database. If you do not specify a content database, the site collection will be restored to a content database chosen by SharePoint 2013.

If you are restoring a host-named site collection, use the Identity parameter to specify the URL of the host-named site collection and use the HostHeader parameter to specify the URL of the Web application that will hold the host-named site collection.

If you want to overwrite an existing site collection, use the Force parameter.

0

You should then try to go with the site template option. It gives you the option to save a copy of the site without the content and restore it to a different server.

Refer to the image below: enter image description here

2
0

For my migration from developement environment to production I used this approach

http://ittechnotebook.blogspot.com/2013/07/how-to-move-sharepoint-2010-site.html

1
  • 2
    This site is not for promoting your own blog posts. Please add more details to your answers now and in the future! Oct 14, 2014 at 19:54
0

sharepoint-site-collection-from-one-Server-to-another-Server

Link

1
  • It's almost what i need, but is there a way to copy site collection with empty libraries?
    – Nana
    Nov 28, 2012 at 8:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.