Announcement Banner
UNSOLVED

dynamox

updated

19 years ago

D

dynamox

11 Legend

•

20419 Posts

•

87439 Points

0

709

October 24th, 2007 14:00

How to export zone sets from cli

Folks,

does anybody know how to automate zone set export from Connectrix Manager. I am trying to automate zone set export so that it runs every night and saves most current information to an xml file. I have looked at Connectrix manager guide but it only talks about commands that you issue once you have connected to the switch. Since connetrix manager does its own backup, is it possible that zone set information is already saved there ?

thanks
  • Kiran3

    410 Posts

    367

    0

    Posted October 24th, 2007 22:00

    i have not used this much,
    but would it be okay if you can schedule configuration save through CLI if connectrix is not supporting it...
  • dynamox

    11 Legend

    •

    20419 Posts

    •

    87439 Points

    367

    0

    Posted October 25th, 2007 05:00

    do you know how to do it ? i will need to figure out how to setup automated login via telnet ..but i do not know the syntax to export zoneset information to a file. Connetrix guide says that regular connectix backup saves zone library information ...so i unzipped BkpPersisted.zip file, yet can't find anything that contains zone information.
  • Kiran3

    410 Posts

    367

    0

    Posted October 25th, 2007 05:00

    i got following code from net, i tried to modify the code for my system but seems this does not work if the switch presents a login banner. if you know perl, you can change it and use it.

    it may need a telnet or net perl library on your machine though (i dloaded it off-net but do not remember the link now :( )

    from cli, you can run the command to output zones information (zoneshow?) and then save the output...

    hope this helps...

    #!/usr/bin/perl
    use Net::Telnet;

    if ($#ARGV != 3){
    print "usage: brocade_cmd.pl \n";
    exit 1;
    }

    $host = $ARGV[0];
    $username = $ARGV[1];
    $passwd = $ARGV[2];
    $command = $ARGV[3];
    $switch = new Net::Telnet (Errmode =>'die', Timeout => 10 );
    $switch->open($host);
    $switch->waitfor('/ogin: $/');
    $switch->print($username);
    $switch->waitfor('/assword: $/');
    $switch->print($passwd);
    $switch->waitfor(Match => '/proceed./', Match => '/> /');
    $switch->print("^C");
    $switch->waitfor('/> $/');
    print $switch->cmd($command);
    print "\n";
    $switch->print("exit");
  • dynamox

    11 Legend

    •

    20419 Posts

    •

    87439 Points

    367

    0

    Posted October 25th, 2007 06:00

    once i am in telnet session ..where am i redirecting it to ? I need to redirect output of "show.zoning" to my local hard drive.
  • Kiran3

    410 Posts

    367

    0

    Posted October 25th, 2007 06:00

    you can redirect the output of this script so automatically you will get the zoneset information in the dump.