SharePoint 2013 Backup Farm Automatically With a Powershell and Windows Task Schedule
2015-03-02 00:00
926 查看
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.
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force
Backup-SPFarm -BackupMethod Full -Directory D:\backup
Save the file and name SPFarmFullBackup.ps1
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.
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
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.PowerShellSet-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.PowerShellSet-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 StartSelect "任务计划程序"
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
相关文章推荐
- SharePoint 2013 Backup Farm Automatically With a Powershell and Windows Task Schedule
- SharePoint 2013 Backup Farm Automatically With a Powershell and Windows Task Schedule
- SharePoint 2013 How to Backup Site Collection Automatically With a PowerShell Script
- SharePoint 2013 How to Backup Site Collection Automatically With a PowerShell Script
- SharePoint 2013 How to Backup Site Collection Automatically With a PowerShell Script
- SharePoint 2010 Cookbook: Backup a Site Collection Automatically with a PowerShell Script
- How to deal with Windows Schedule&Task by PowerShell in Win7
- Backup a farm by using SharePoint 2013 Central Administration and the Error Solution
- SharePoint 2007 Full Text Searching PowerShell and CS file content with SharePoint Search
- taskscheduleR: R package to schedule R scripts with the Windows task manager
- Managing SharePoint 2010 Farm Solutions with Windows PowerShell
- SharePoint 2013: A feature with ID has already been installed in this farm
- SharePoint 2013: A feature with ID has already been installed in this farm
- Sharepoint 2013-A feature with ID has already been installed in this farm
- SharePoint 2010 Provisioning A New Farm with PowerShell
- Installing and Configuring Windows Server Backup for Hyper-V
- Windows Developer Power Tools: Turbocharge Windows Development with More Than 140 Free and Open Sour
- Install Ubuntu and Let it Dual Boot with Windows
- Networking with Microsoft Windows Vista: Your Guide to Easy and Secure Windows Vista Networking
- 项目管理实践【五】自动编译和发布网站【Using Visual Studio with Source Control System to build and publish website automatically】