文档章节

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

没有更多内容

加载失败,请刷新页面

加载更多

打包QML程序

1、windeployqt执行路径(D:\Qt\5.12.0\msvc2017_64\bin)加入到PATH中 2、使用Qt自带的命令行交互 Command 终端(Qt 5.12.0 64-bit for Desktop (MSVC 2017))切换到 Release 编译成功的exe...

渣渣曦
35分钟前
3
0
优秀互联网高级测试工程师应该具备的能力

概述 在之前写的互联网高级测试工程师至少具备的能力一文中,提到了测试工程师至少具备的能力,但是并没有提到优秀测试工程师应该具备的能力,下文简单的谈一谈。当然这些全部都是我的个人理...

Sam哥哥聊技术
39分钟前
3
0
webpack项目配置

前端工程化 前端工程化是根据业务特点,将前端开发流程规范化,标准化,它包括了开发流程、技术选型、代码规范、构建发布等等,用语提升前端工程师的开发效率和代码质量。 自动化构建工具 1、...

羊皮卷
41分钟前
1
0
Linux命令备忘录: jobs 显示Linux中的任务列表及任务状态命令

jobs命令用于显示Linux中的任务列表及任务状态,包括后台运行的任务。该命令可以显示任务号及其对应的进程号。其中,任务号是以普通用户的角度进行的,而进程号则是从系统管理员的角度来看的...

开元中国2015
今天
3
0
springboot Whitelabel Error Page(Not Found)解决方案

当出现上图图的错误时注意 报错信息 There was an unexpected error (type=Not Found, status=404). Not Found代表未访问到资源 解决方案:比较访问路径和代码的路径有没有写错 正确的访问路...

斩神魂
今天
2
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部