Advertisements

Sharepoint 2010 Backup – Automated Backup with Powershell

You can run powershell commands directly from the Sharepoint 2010 Management Shell window; but that does not suit the purpose when you require a daily backup

Start - All Programs - Sharepoint 2010 Management Shell

Its’ surprising why Sharepoint themselves could not come out with an easy automated tool. Nevertheless; the below post would guide you through

Firstly, we need to define a backup location.

  • Is your Sharepoint Farm and SQL Server on different Servers? If yes, kindly ensure that the Backup Location that you define is a Share Drive (\\sharedrive\backupfolder) and has full Write Access for both the Sharefoint Farm Admin Account and SQL Server Account

Farm Backup is best done as both a Full and subsequent Incremental Backups

Full Backup

Create a File with the extension ps1 (denotes a powershell command file)

Add-PsSnapin Microsoft.SharePoint.Powershell
Backup-SPFarm -Directory \\sharedrive\backupfolder -BackupMethod Full

Setting up a Windows Task Schedule for the Farm Backup

Start – All Programs – Administrative Tools – Task Scheduler – Create Task

Give an appropriate name and under Actions tab; click New

Type powershell under Program field and state the ps1 file that you created above under the Add Arguments field

Task_Schedule

Specify an appropriate time under the Trigger tab for your task to run.  Since its a full backup its best to set a time after regular office hours

Incremental Backup (Daily backup of changed data since the last backup)

Create a File with the extension ps1 (denotes a powershell command file)

Add-PsSnapin Microsoft.SharePoint.Powershell Backup-SPFarm -Directory \\sharedrive\backupfolder -BackupMethod Differential

Use the Task Scheduler as illustrated earlier to define the daily backup

Advertisements

Posted on January 16, 2014, in Backup, Sharepoint and tagged , , . Bookmark the permalink. Leave a comment.

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

%d bloggers like this: