SharePoint 2010 – How to backup and restore a site collection with PowerShell

Backup a Site collection with PowerShell

Backup-SPSite -Identity http://myserver -Path "c:\backup\file.bak"

Restore a Site Collection with PowerShell

Restore-SPSite -Identity http://myserver -Path "c:\backup\file.bak"