skype backup tool
Skype for Business Backup Tool
First off I will admit that this is not ground breaking in terms of no one has done it before. I’ve ummmed and arrrrghhed about releasing this for some time as the backup script by Lasse Wedo is amazing and will do a great job. However, I believe that my script tool brings some added value to the table and offers something a little different. For this reason I have decided it is worth a release to the community.
Overview
The backup tool is a PowerShell script that has several modes of backup, ranging from a full Skype for Business backup to modular backups for backing up policies, or configurations, or topology etc. This script can be run as a scheduled task or ad-hoc using PowerShell. It can be run from a management workstation with the Skype for Business management tools installed or from a front end server. Each backup process has been written as a separate function that allows you to be selective in what you want to backup. When run, the script will create the required root and log directory on the machine using the default path C:\sfb_backup. This can be changed by editing the first few lines of the script.
Features
- Back up Topology
- Back up CMS Database
- Back up Persistent Chat Database
- Back up User Data
- Back up File Share
- Back up All Policies
- Back up All Configuration
- Back up Response Groups
- Send Email to admin on completion (Full Backup Only)
- Compress Backup file to ZIP (Full Backup Only)
- Full Logging capabilities
- Progress indicator
Requirements
The server or workstation you are running this script on, must have the Skype for Business Management Tools installed. The PowerShell Execution Security should be set to RemoteSigned, or Unrestricted mode
Operation
First, open the script and set your backup directory by changing the $backupfolder variable value. Once set scroll down to the Routines section marked in the script as ## ROUTINES ##. Uncomment the commandlet(s) you want to execute and save the script. Now you can execute the script using scheduled tasks or by executing the script directly.
Estimated times for a backup to complete will vary on the amount of data held in your databases and file share. If you use Lync Phone Edition, the script will back-up all firmware installed so this can add many Gigabytes to the backup. Average backup times for a 2GB file share is about 12 minutes
Updates
20/01/2016 – Added support for backing up Shared Line Appearance and introduced compatibility for Normalization rules added by Ken Lasko’s normalization tool
Current Version
The current supported version is 3.2
Download
The script is available to download from Microsoft TechNet here
Screenshots
Backup Folder Structure
Log File Detail
Inside the Backup Folder
Inside the Configuration Folder
Configuration Backup Detail Example
Policy Backup Folder
Policy Backup Detail
Email Example
Commandlets
Backup All – Backup-All
The Backup-All commandlet will take a full backup of the Skype for Business system by executing all the below commandlets in turn. After the backup completes the backup folder is compressed to a Zip file and you have the option to be sent an email with the backup log attached to confirm the completion of the backup.
Commandlet: Backup-All
User to Set e.g. ex01.hostedhouse.local
Backup-All –FilePath $backupfolder –LogFile $logfile –MailTo mark@hostedhouse.co.uk –MailFrom backup@hostedhouse.co.uk –SMTPServer ex01.hostedhouse.local
Backup CMS Data – Backup-CMS
The Backup-CMS commandlet will take a backup of the Central Management Database data and save it to a zip file within the backup folder
Commandlet: Backup-CMS
Backup-CMS –FilePath $backupfolder –LogFile $logfile
Backup Policies – Backup-Policies
The Backup-Policies commandlet will take a backup of all the Skype for Business policies within the deployment and is backed up to the following directory \Policies
Commandlet: Backup-Polices
Backup-Policies –FilePath $backupfolder –LogFile $logfile
Backup Configuration – Backup-Configuration
The Backup-Configuration commandlet will take a backup of all the configuration settings within your deployment. This is an extensive list of configuration that is backed up to the following directory \Configuration
Commandlet: Backup-CMS
Backup-Configuration –FilePath $backupfolder –LogFile $logfile
Backup File Store – Backup-FileStore
The Backup-FileStore commandlet will take a backup of the Lync shared folder and copy its contents to \
Commandlet: Backup-FileStore
Backup-FileStore –FilePath $backupfolder –LogFile $logfile
Backup Persistent Chat Data – Backup-PChat
The Backup-PChat commandlet will take a backup of the Persistent Chat Database data and save it to a zip file within the backup folder
Commandlet: Backup-PChat
Backup-PChat –FilePath $backupfolder –LogFile $logfile
Backup Response Groups Data – Backup-RGS
The Backup-Rgs commandlet will take a backup of the configured response groups.
Commandlet: Backup-Rgs
Backup-CMS –FilePath $backupfolder –LogFile $logfile
Backup User Data – Backup-UserData
The Backup-UserData commandlet will take a backup of user’s data and save it to a zip file within the backup folder
Commandlet: Backup-UserData
Backup-UserData –FilePath $backupfolder –LogFile $logfile
Restoring
With any backup you need a method of restoring the data, otherwise what’s the use of a backup right? I have resisted the temptation to create a restore script because there are that many different restore scenarios that it would almost be impossible to code a restore script, for free anyway. However, you can restore from the backups taken using a mixture of native Skype for Business commands and a little help from another awesome commandlet.
To restore open the Skype for Business Management Shell and change the working directory to your backup folder. From here you can reference easily the files you want to restore from.
Configuration Restore Example
So you have deleted a Call Park Orbit range, oops! No matter, I have a backup
Look for your backup file for the orbit range you have deleted.
Let’s restore it using this command
Import-CliXml –Path ‘.\CallPark\Call Park Orbit.xml’ | Set-CsCallParkOrbit
Now let’s check if it has restored
Life saved and I will live a bit longer!
Policy Restore Example
So you have deleted a Client Policy by mistake.. No bother we have a backup
Let’s restore the missing client policy using this command
Import-CliXml –Path ‘.\Client Policies\HQClientPolicy.xml’ | Set-CsClientPolicy
Now let’s check if it has been restored
Awesome. But… There is an additional step for user policy restores specifically, in that once restored, you are going to have to Grant users this policy again. However fear not. I have a script called Skype for Business User Detailed Report that you can run to find out which policies where assigned to users. So as long as you have run that prior to needing a restore, at least you have a starting point to work from.
On a side note, some of you with eyes for detail will realise that I have not added support for certificate backup. This is on purpose. When I was evaluating the benefit of putting this in, it was just as quick to request new certificates and apply them as it was to create PS Sessions to all servers for extraction and importing. And I prefer to keep control of certificate management manually because I have had a ton of pain with them in the past.
So hope you like this tool / script. I know it is nothing new, but hopefully will give you options.
Mark is an Independent Microsoft Teams Consultant with over 15 years experience in Microsoft Technology. Mark is the founder of Commsverse, a dedicated Microsoft Teams conference and former MVP. You can follow him on twitter @UnifiedVale
Итог: Mark is an Independent Microsoft Teams Consultant with over 15 years experience in Microsoft Technology. Mark is the founder of Commsverse, a dedicated Microsoft Teams conference and former MVP. You can follow him on twitter @UnifiedVale
Комментариев нет:
Отправить комментарий