Automating Site Collection Backup and Restore

To perform a backup of an individual site collection, type the following:

Backup-SPSite "http://portal.companyABC.com" –path "C:Backupsportal.dat" -force

The command in the preceding example backs up a site collection at the given url to the designated path. Before running this cmdlet, make sure this path (for example, C:Backup) exists. In case there is a previous backup file at this location, use the –force parameter to overwrite an existing backup file.

To restore the site collection, type the following:

image

There are two parameters that must be used for silent site collection restore. -force ensures any existing site collection at http://portal.comapanyabc.com will be overwritten and -confirm:$false suppresses the overwrite confirmation dialog. By suppressing the confirmation, you can easily automate a restore operation.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset