New Script: Backup VMware Virtual Distributed Switches V1.00
I wrote an article on how to Backup the vCenter Server Appliance using NFS and then needed to figure out how to restore the backup. In VMware’s article on restoring a vCenter server, I saw this:
“If you use a distributed virtual switch, you are advised to export
separately the distributed virtual switch configuration before you
restore to a backup. You can import the configuration after the restore. If you omit this consideration, you may lose the changes made to a distributed virtual switch after the backup.
That lead me to create a script to automate backing up (or exporting) the Virtual Distributed Switches (vDS).
I used some code from Jacob’s VMware documentation script, which made creating the script easier. When I ran the backup script, I notice there was a lot of screen noise when the PowerCLI modules loaded. I fixed that and ported the fix to the V1.9 VMware documentation script.
By default, every vDS in every Datacenter on the specified vCenter server is backed up using the following naming scheme.
As usual, the script has full help text and a ReadMe file.
You can always find the most current script by going to https://www.carlwebster.com/where-to-get-copies-of-the-documentation-scripts/