скачать skype


пятница, 28 апреля 2017 г.

Skype for Business Backup Tool, skype backup tool.

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.


Skype for Business Backup Tool, skype backup tool.


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


Skype for Business Backup Tool, skype backup tool.


Skype for Business Backup Tool, skype backup tool.


Log File Detail


Skype for Business Backup Tool, skype backup tool.


Inside the Backup Folder


Skype for Business Backup Tool, skype backup tool.


Inside the Configuration Folder


Skype for Business Backup Tool, skype backup tool.


Configuration Backup Detail Example


Skype for Business Backup Tool, skype backup tool.


Policy Backup Folder


Skype for Business Backup Tool, skype backup tool.


Policy Backup Detail


Skype for Business Backup Tool, skype backup tool.


Email Example


Skype for Business Backup Tool, skype backup tool.


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


The $backupfolder variable will use the default backup path that is set on script load. You can enter your own path if you wish but it must be literal and the folder must already exist e.g. d:\backup\
The $logfile variable will use the default backup path that is set on script load. You can enter your own path if you wish but it must be literal and the file must already exist e.g. d:\backup\log\backup.log
Specify the from address the email will be sent from. Your SMTP server should accept unauthenticated emails from the server which you are running the script from. Or the email address you use here must exist on your SMTP server.

User to Set e.g. ex01.hostedhouse.local


Although listed as optional it is required if you want the email to be sent


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


The $backupfolder variable will use the default backup path that is set on script load. You can enter your own path if you wish but it must be literal and the folder must already exist e.g. d:\backup\
The $logfile variable will use the default backup path that is set on script load. You can enter your own path if you wish but it must be literal and the file must already exist e.g. d:\backup\log\backup.log

This is used for internal script use and should not be declared in any function. Do not use as it will cause backup directory confusion.


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


The $backupfolder variable will use the default backup path that is set on script load. You can enter your own path if you wish but it must be literal and the folder must already exist e.g. d:\backup\
The $logfile variable will use the default backup path that is set on script load. You can enter your own path if you wish but it must be literal and the file must already exist e.g. d:\backup\log\backup.log

This is used for internal script use and should not be declared in any function. Do not use as it will cause backup directory confusion.


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


The $backupfolder variable will use the default backup path that is set on script load. You can enter your own path if you wish but it must be literal and the folder must already exist e.g. d:\backup\
The $logfile variable will use the default backup path that is set on script load. You can enter your own path if you wish but it must be literal and the file must already exist e.g. d:\backup\log\backup.log

This is used for internal script use and should not be declared in any function. Do not use as it will cause backup directory confusion.


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


The $backupfolder variable will use the default backup path that is set on script load. You can enter your own path if you wish but it must be literal and the folder must already exist e.g. d:\backup\
The $logfile variable will use the default backup path that is set on script load. You can enter your own path if you wish but it must be literal and the file must already exist e.g. d:\backup\log\backup.log

This is used for internal script use and should not be declared in any function. Do not use as it will cause backup directory confusion.


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


The $backupfolder variable will use the default backup path that is set on script load. You can enter your own path if you wish but it must be literal and the folder must already exist e.g. d:\backup\
The $logfile variable will use the default backup path that is set on script load. You can enter your own path if you wish but it must be literal and the file must already exist e.g. d:\backup\log\backup.log

This is used for internal script use and should not be declared in any function. Do not use as it will cause backup directory confusion.


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


The $backupfolder variable will use the default backup path that is set on script load. You can enter your own path if you wish but it must be literal and the folder must already exist e.g. d:\backup\
The $logfile variable will use the default backup path that is set on script load. You can enter your own path if you wish but it must be literal and the file must already exist e.g. d:\backup\log\backup.log

This is used for internal script use and should not be declared in any function. Do not use as it will cause backup directory confusion.


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


The $backupfolder variable will use the default backup path that is set on script load. You can enter your own path if you wish but it must be literal and the folder must already exist e.g. d:\backup\
The $logfile variable will use the default backup path that is set on script load. You can enter your own path if you wish but it must be literal and the file must already exist e.g. d:\backup\log\backup.log

This is used for internal script use and should not be declared in any function. Do not use as it will cause backup directory confusion.


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


Skype for Business Backup Tool, skype backup tool.


Look for your backup file for the orbit range you have deleted.


Skype for Business Backup Tool, skype backup tool.


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


Skype for Business Backup Tool, skype backup tool.


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


Skype for Business Backup Tool, skype backup tool.


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


Skype for Business Backup Tool, skype backup tool.


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.


Skype for Business Backup Tool, skype backup tool.


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

Комментариев нет:

Отправить комментарий