Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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 ?

share|improve this question

migrated from stackoverflow.com Nov 29 '12 at 17:50

This question came from our site for professional and enthusiast programmers.

4 Answers 4

up vote 2 down vote accepted

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.

share|improve this answer
    
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 '12 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 '12 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 '12 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 '12 at 10:43
    
Whole web application –  Nana Nov 28 '12 at 10:47

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

http://blogs.msdn.com/b/vrajas/archive/2012/02/22/backup-and-restore-sharepoint-site-collection-from-one-farm-to-another-farm-using-stsadm-commands.aspx

share|improve this answer
    
It's almost what i need, but is there a way to copy site collection with empty libraries? –  Nana Nov 28 '12 at 8:45

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

share|improve this answer
    
Will it include subsites for this site? –  Nana Nov 28 '12 at 10:47

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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