Posts Tagged SharePoint

PowerShell script to back up a SharePoint 2010 Site Collection with a unique (date/time) filename

This PowerShell script will backup a SharePoint 2010 (Host Header URL) Site Collection to a single .BAK file with a date and time filename.

Replace the following with your own values:
bkupLoc = NTFS share that .BAK file will be written to.
sitecoll = the URL of your site collection (I’m using it for a HHURL site collection).

Add-PsSnapin Microsoft.SharePoint.Powershell
#Backup location
$bkupLoc = “\\server\share\myscbkupfolder\
$adate =get-date
#Site collection location
$sitecoll = “
#daily filename
$bkupfile = $bkupLoc+”{0:ddMMMyyyyhhmm}”-f$adate+”.bak”
Backup-SPSite -Identity $sitecoll -Path $bkupfile


Leave a Comment

Moving a SharePoint 2010 Host Header Site Collection to a new server in a new domain.

This example describes how to move a SharePoint 2010 Host Header (HHURL) site collection from a server in domaina to a new server in domainb. The example also deals with migrating users within the HHURL site collection from domaina to domainb.

The existing HHURL site collection is currently on hosta and Content Database is existingDB.
Create a new HHURL site collection on on hostb and Content Database is mynewscDB.
Ensure your DNS record for the new HHURL site collection is mapped correctly i.e. you can get to it from the outside world.
Login to the new site collection and verify.
Backup the existing site collection on hosta to scbackup.bak file using Central Admin > Backup & Restore > Granular Backup > Perform a Site Collection Backup. Read the rest of this entry »

Comments (3)

SharePoint Site Collections and Host Header URLs

If you want to use SharePoint for hosting multiple vanity URLs one option is to use Host Header URLs.

e.g. and , etc……

I used the following software:

Windows 2008 RTM SP2 virtual server, SQL 2008 SP1, WSS 3.0 SP2 for 64bit

Create a Web App for (top level site) on port 80.

Create a site collection on this new Web App, use whatever template you wish.

Read the rest of this entry »

Comments (1)