vCenter Server provides the ability to backup and restore the configuration of a vSphere Distributed Switch. You can restore the virtual network configuration in cases of database or upgrade failure. You can also use a saved switch configuration as a template to create a copy of the switch in the same or a new vSphere environment.
You can import or export a configuration of a distributed switch including its port groups. For information about exporting, importing, and restoring a port group configuration, see Export, Import, and Restore vSphere Distributed Port Group Configurations.