Backup a SharePoint Site Collection (and restore it)

The following assumes you have a Host Named Site Collection.

Backup:

backup-spsite http://oilshop.beaversoil.com -Path e:\MyServerPath\MyFilename.bak -UseSQLSnapShot -force

 

Technet: http://technet.microsoft.com/en-us/library/ff607901(v=office.15).aspx

Notice nothing special needs to be done in regards to the host named site collection when performing the backup.

Restore:

Restore-SPSite http://oilshop.beaversoil.com -Path \\file_server\share\site_name.bak -HostHeaderWebApplication http://server_name.beaversoil.com

 

 

Notice how the actual web application is referenced, this is key

Technet: http://technet.microsoft.com/en-us/library/ff607788(v=office.15).aspx