SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know I can use PowerShell or Central Admin to backup a SharePoint site collection or site.

Is there a way to automate this process or do I have to create a scheduled task that runs either a PowerShell or stsadm command?

share|improve this question
up vote 4 down vote accepted

As you stated - "create a sheduled task that runs either power-shell or stsadm command". No other options for now and it would be nice to have option of built-in automatic backup in future version of sharepoint

And here is a good post how to do it - Backup site collection.

share|improve this answer
Thanks Andrey, That was just great :) – Jithu Nov 21 '11 at 10:01

Open SharePoint management shell or PowerShell and the following command

stsadm -o backup -filename c:\backup.bak -url http://servername

The above command is used to backup the site collection. So if u need to schedule it to run regularly, Save this command in a file with the extension .ps1 and configure it to the Windows Task Scheduler

share|improve this answer
Hi Paddy, Thank you for your help!! however it would be great if I can use it from central administration... – Jithu Nov 15 '11 at 13:13

simply schedule the below Power-shell script using SQL Agent Job or Windows Scheduler

you can append all other site export inside this powershell file

note that it will generate the new file name based on current date so you must have other job to delete them weekly or use the SQL agent Cleanup

$baseFileName = "FinalSITE"
$currentDate = (Get-Date).ToString('yyyyMMddHHmm')
$completeFilepath= ""+ $FolderPath +$baseFileName +$currentDate +".cmp"
Write-Host $completeFilepath

Export-SPWeb "" –Path $completeFilepath -IncludeVersions All -IncludeUserSecurity 
share|improve this answer

Your Answer


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.