Export/Import of SharePoint 2010 site using Power Shell

Hello again
I usually backup and restore the whole site collection via these commands:

1)Backup-SPSite -Identity -Path [-Force] [-NoSiteLock] [-UseSqlSnapshot] [-Verbose]

2) Restore-SPSite -Identity -Path [-DatabaseServer ] [-DatabaseName ] [-HostHeader ] [-Force] [-GradualDelete] [-Verbose]

but today i am going to show you how to import the web only:
1) Start by lunching SharePoint 2010 Management Shell, you will get a Power shell command prompt like below:
2) type this command “Export-SPWeb -Identity http:\\ServerName:port\Site -Path c:\\backup\Exportback.dat”


The NoFileCompression parameter lets you specify that no file compression is performed during the export process. Using this parameter can lower resource usage up to 30% during the export process. Using this parameter will result in a backup folder being created instead of a compressed file. If you use the NoFileCompression parameter in the Export-SPWeb command, you must also use it when you import the content by using the Import-SPWeb command.

3)To import to a site you have to use Import-SPWeb command, The complete command is

Import-SPWeb -Identity http:\\ServerName:port\Site -Path c:\\backup\Exportback.dat -Force

I have used -force to over write the existing site in my destination



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s