前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >SharePoint 2013 Backup Farm Automatically With a Powershell and Windows Task Schedule

SharePoint 2013 Backup Farm Automatically With a Powershell and Windows Task Schedule

作者头像
用户1161731
发布2018-01-11 15:42:38
6360
发布2018-01-11 15:42:38
举报
文章被收录于专栏:木宛城主木宛城主

In this post,I will show you SharePoint 2013 How to Backup Farm Automatically with a PowerShell and Windows Task Schedule. First,to backup your Farm,you can use the powershell command Backup-SPFarm.

You can use the command to backup the farm a Full backup as in the following example.

Backup-SPFarm -BackupMethod Full -Directory D:\backup

And to Backup the farm a differential backup,you can use the command as in the following example.

Backup-SPFarm -BackupMethod Differential -Directory D:\backup

So Let's Create two PowreShell Script File,One for the full backup and another for the differential backup.

Step 1:Create a PowerShell for the full farm backup

Add-PSSnapin Microsoft.SharePoint.PowerShell

Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force

Backup-SPFarm -BackupMethod Full -Directory D:\backup

Save the file and name SPFarmFullBackup.ps1

Step 2:Create a PowerShell for the differential farm backup

Add-PSSnapin Microsoft.SharePoint.PowerShell

Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force

Backup-SPFarm -BackupMethod Differential -Directory D:\backup

Save the file and name SPFarmDiffBackup.ps1

Now,follow the steps below to create the tasks for Task Schedule to automate the execution of backup files.Assume we will full-backup weekly and differerntial-backup daily.

Step 3: Schedule a batch file to Run Automatically

  • Click On Start
  • Select "任务计划程序"
  • In the center pane,right-click ,and click "创建基本任务"
  • Assigning the task a meaningful name-such as SharePoint-BackupFarmFullWeekly
  • Choose "每周"
  • Specific the parameters for the weekly task schedule
  • Next Choose "启动程序"
  • Type in the command as the screenshot below
  • The Task scheduler is intelligent enough to recognize that you want to run PowerShell and that you supplied arguments

Now,that we have created a Task,we have to make sure it runs highest Privilege. we have to make sure that when you run the file it not should fail.

  • Right Click the task you just created and Select Property
  • Click on "使用最高权限运行" then click OK.
  • Repeate the steps above to create a diff-backup task schedule
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2014-03-22 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Step 1:Create a PowerShell for the full farm backup
  • Step 2:Create a PowerShell for the differential farm backup
  • Step 3: Schedule a batch file to Run Automatically
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档