Dwarfsoft [GPA]

Brocade Clone Config

by on Jun.22, 2015, under Scripting, Storage, Uncategorized, Work


Print This Post Print This Post

I was attempting to get a cloned configuration on Brocade switches as part of a PowerShell script that is adding Aliases and Zones to the Active Config. The original code that created the tasks to be run on the Brocade switch required 2 separate calls to PLINK in order to get all its information. The first was a call to cfgactvshow, and the second was a call to alishow. I knew there had to be a better way, so I developed the following one liner for cloning the active zone configuration based on our standard rules:

zoneobjectcopy "`cfg=\`cfgactvshow|grep "cfg:"\`;echo ${cfg:6}\", \"${cfg:6}_\`date +\"%Y%m%d%H%M%S\"\``"

Simply, this gets the current active configuration name, then clones that to the current name with a date appended on the end. Follow this up with a cfgSave in order to save the newly copied config.

Cheers,
Chris.

:, , , ,

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!