文档章节

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

 木宛城主
发布于 2015/03/02 19:43
字数 340
阅读 8
收藏 0

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

 

 

 

 

 

© 著作权归作者所有

共有 人打赏支持
粉丝 2
博文 222
码字总数 199010
作品 0
黄浦
【Powershell】早期操作系统如何更新安装Windows PowerShell 4.0

http://social.technet.microsoft.com/wiki/contents/articles/21016.how-to-install-windows-powershell-4-0.aspx Windows PowerShell 4.0 is part of the Windows Management Framework 4.......

xifalniang
2016/09/02
0
0
PowerShell为什么强大

微软是一个很”低调”的公司,取名为微软,感觉有“微微软下去”的意思,这是个玩笑了。windows 操作系统 和office办公软件,如此之优秀,微软也没敢命名为PowerOS 和 PowerOffice,但是在Mon...

babylater
07/02
0
0
使用PowerShell关闭和锁定屏幕

ThinkPad T430没有关闭屏幕的功能键,不太方便,正好最近在折腾PowerShell,便写个脚本来实现这个功能。 1. 相关内容 1.1. PowerShell配置 为了更方便的使用脚本,需要用到3.0版的模块自动装...

joshuazhan
2014/01/04
0
0
Exchange 2019预览版部署安装——Part2

上一篇文章,大致分享了Exchange 2019的新功能和我测试Exchange 2019的大致环境介绍。下面具体分享安装过程。总体来说Exchange 2019在WIndows server core上安装比之前的版本安装简单很多,无...

jialt
07/29
0
0
使用VisualStudio构建自定义Snap-In

使用VisualStudio构建自定义Snap-In Snap-In 即在PowerShell V1 时候引入的二进制管理单元, 必须使用 Visual Studio 等开发工具进行开发。用于扩展系统功能,自定义CmdLet 由于这种方法专业...

strikene
06/26
0
0

没有更多内容

加载失败,请刷新页面

加载更多

下一页

maven坐标和依赖

一、maven坐标详解 <groupId>com.fgt.club</groupId><artifactId>club-common-service-facade</artifactId><version>3.0.0</version><packaging>jar</packaging> maven的坐标元素说......

老韭菜
今天
1
0
springmvc-servlet.xml配置表功能解释

问:<?xml version="1.0" encoding="UTF-8" ?> 答: xml version="1.0"表示是此xml文件的版本是1.0 encoding="UTF-8"表示此文件的编码方式是UTF-8 问:<!DOCTYPE beans PUBLIC "-//SPRING//......

隐士族隐逸
今天
1
0
基于TP5的微信的公众号获取登录用户信息

之前讲过微信的公众号自动登录的菜单配置,这次记录一下在TP5项目中获取自动登录的用户信息并存到数据库的操作 基本的流程为:微信设置自动登录的菜单—>访问的URL指定的函数里获取用户信息—...

月夜中徘徊
今天
0
0
youTrack

package jetbrains.teamsys.license.runtime; 计算lis package jetbrains.ring.license.reader; 验证lis 安装后先不要生成lis,要把相关文件进行替换 ring-license-checker-1.0.41.jar char......

max佩恩
今天
1
0
12.17 Nginx负载均衡

Nginx负载均衡 下面的dig看到可以返回2个IP,就是解析出来的IP,这样我们可以做负载均衡。 dig www.qq.com 1.vim /usr/local/nginx/conf/vhost/fuzai.conf 2.添加如下配置 upstream qq //定义...

芬野de博客
今天
0
0

没有更多内容

加载失败,请刷新页面

加载更多

下一页

返回顶部
顶部