Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Is this the right way to write a SharePoint 2010 differential backup script?

@echo off
echo ====================================================
echo Backup Script For  SharePoint Server 2010
echo ====================================================
cd \program files\common files\micrsoft shared\web server extensions\14\bin
@echo off
stsadm.exe -o backup -url http://mysitecollection -filename D:\SPBACK1116201011AM.bak  -nositelock  -overwrite -backupmethod differential
@echo off
echo completed
share|improve this question

1 Answer 1

PowerShell is the preferred method, you have more options, and will be the supported method going forward (STSADM is depreciated and only included in 2010 for 2007 compatibility).

The command is Backup-SPFarm -Directory -BackupMethod

Here is the TechNet reference

http://technet.microsoft.com/en-us/library/ff607881.aspx

One of the biggest benefits is you can utilize SQL Snapshots, which you cant do from CA or STSADM. This means users can continue to interact with SharePoint while the Backup is taking place.

Additionally Todd Klindt has a post with two scripts, one to backup Site Collections and one for individual webs.

http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=191

If you want to schedule them to run, you need to utilize task scheduler to kick off the PowerShell script.

TechNet article on PowerShell execution

http://technet.microsoft.com/en-us/library/ee176949.aspx#EBAA

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.