This is a simple script to back up your Lync 2013 or Skype for Business (SfB) Standard or Enterprise Edition Server to a single zip.file. It does not only make a copy of your topology, but will make a backup of your IIS files, your
SQL server databases and much more.
This is really a continuation of the backup-lync2013 script, but has been modified for SfB.
The current version is now 4.2 - April 2017
- The script is for both Enterprise and Standard Edition Server.
- The script has been tested in a multiple site topology. But run with care if not in a single site.
- Be aware of possible caveats with blocking firewalls, or missing rights on severeal components.
- The script has been tested with a co-location of all databeses.
- The script has been tested with databases on seperate instances.
- Options to skip database backups as needed
- The script should be able to run without any modification or input, unless you want to use other paths than I have entered.
- The script must be run on a server where Lync PS 2013 is available.
- The script must be run in a PS3 environment, and will load all nessecary modules automatically
- The script creates a directory C:\UCBackup\ as a default, this may be altered
- Certificates will only be backed up if you allowed for this when requesting and creating certificates.
- Certificate backup is only done on the machine where the script is run
- The script will delete existing backups, aged 5 days or older.
- The creation of the zipfile can take a while. The script is supposed to for the zipfile to finished.
- I highly recommend you test the script in your Lab, before running in your production environment
- If running the script on a failover-configured pool, run it on the master server
- Supports SQL 2008, SQL 2008 R2, SQL 2012 and SQL 2014
- Script removes temp working files, leaving only ZIPfile
- Least user privelige is "RTCUniversalServerAdmins"
(To see a complete history, use get-help, or see the backup-lync2013 page:
- v 4.00 - April 2015
- Change: Script renamed to Backup-SfB.ps1
- Change: Script edited to work with Skype For Bisiness server deployment (TAP Bits)
- Change: Shortened filepath by using hostnames, not fqdn for naming
- Change: New destination = c:\ucbackup
- New feature: Added a switch to set a password for certificate $CertPass
- New feature: Certificate export will now add "usages" for the exported certificates
- Bugfix: If the same certificate is used for multiple usages, the next export (with an existing thumbprint) is skipped, only the first usage is displayed
- New feature: A warning is displayed if a cert is not exportable
- FEATURE REQUEST: Send an email notification on completion
- v 4.00(b) - April 2015 - All thanks to @AlessioGiombini :)
- FEATURE REQUEST: Add announcement service as a seperate list
- FEATURE REQUEST: export a list of common areaphones
- FEATURE REQUEST: export a list of Analog phones
- FEATURE REQUEST: Add unnasigned numbers as a seperate list
- v 4.00(c) - April 2015
- Bugfix: Slight changes to DebugSQL to capture more information
- Change, setting error correction to silently continue as a default.Trying to surpress the unnecceary red text when a database backup fail
- v 4.01 - February 2016
- New feature: Added the -SkipAllSQl switch to skip DB backup entirely
- Change: Remote SQL backup can fail when SQL security forbids WMI. The connection string for backup have changed (New known issue: see below)
- New string parameter: -KeepDaysLog to control the number of days to keep logs
- Feature request: -Storebackupto to control where you want to store the final zipped file
- v 4.2 - April 2017
- FEEDBACK: Decided to exclude WinFabfolder by defualt
- FEEDBACK: Tried to exclude the folder DfsrPrivate from file backup <- Not verified 100%
- New feature: Added a parameter set to specifiy backuptasks, instead of just exluding. Should give a more flexible experience.
- Changed names of the parameter sets to simplify troubleshooting and making the script easier to understand.
- Removed SQL DEBUG code
- There might be an issue with installations not using named instances. Please let me know, and I'll look into it
- Target single pools and not entire deployments <- Would require a huge re-write, so not on the agenda at the moment.
More about the script:
Information about the backup-lync2013 and backup-sfb can be found at my blog:
There are also a few Demo videos available:
Here is a recording of my TechED 2014 (EU) session on the topic: