Going old school with CommVault Simpana Data Interface Pairs

Ok, today I had to go a little old school with CommVault.

My quest, to add the new media servers to the Data Interface Pairs for some clients. I tried passing parameters, and either I was doing it wrong, or something didn't like the parameters. So OLD SCHOOL here we come....

The command line is 

qoperation execscript -sn DataInterfacePairConfig -si add -si CLIENTNAME -si CLIENTIP -si tb-MEDIASERVERNAME -si MEDIASERVERIP

Now I've seen this in other forums with the media server listed first and the client second. But after adding one manually that way, I noticed it was listed backwards from the way CommVault listed it when entered through the GUI.

Note that you must specify both the NAME and IP of the Client and the Media Server

So in my example:
qoperation execscript -sn DataInterfacePairConfig -si add -si fileserv1 -si 192.168.5.10 -si cvmedia1 -si 192.168.5.2

Now for me... I created a batch script to run in this window called addpairs.bat simply listing all the pairs I needed to add

Open a txt editor and list your pairs

qoperation execscript -sn DataInterfacePairConfig -si add -si fileserv1 -si 192.168.5.10 -si cvmedia1 -si 192.168.5.2
qoperation execscript -sn DataInterfacePairConfig -si add -si fileserv2 -si 192.168.5.11 -si cvmedia1 -si 192.168.5.2
qoperation execscript -sn DataInterfacePairConfig -si add -si exchange1 -si 192.168.5.12 -si cvmedia1 -si 192.168.5.2
qoperation execscript -sn DataInterfacePairConfig -si add -si exchange2 -si 192.168.5.13 -si cvmedia1 -si 192.168.5.2
qoperation execscript -sn DataInterfacePairConfig -si add -si exchange3 -si 192.168.5.14 -si cvmedia1 -si 192.168.5.2
qoperation execscript -sn DataInterfacePairConfig -si add -si printsrv1 -si 192.168.5.15 -si cvmedia1 -si 192.168.5.2
qoperation execscript -sn DataInterfacePairConfig -si add -si printsrv2 -si 192.168.5.16 -si cvmedia1 -si 192.168.5.2
qoperation execscript -sn DataInterfacePairConfig -si add -si printsrv3 -si 192.168.5.17 -si cvmedia1 -si 192.168.5.2
qoperation execscript -sn DataInterfacePairConfig -si add -si fileserv1 -si 192.168.5.10 -si cvmedia2 -si 192.168.5.3
qoperation execscript -sn DataInterfacePairConfig -si add -si fileserv2 -si 192.168.5.11 -si cvmedia2 -si 192.168.5.3
qoperation execscript -sn DataInterfacePairConfig -si add -si exchange1 -si 192.168.5.12 -si cvmedia2 -si 192.168.5.3
qoperation execscript -sn DataInterfacePairConfig -si add -si exchange2 -si 192.168.5.13 -si cvmedia2 -si 192.168.5.3
qoperation execscript -sn DataInterfacePairConfig -si add -si exchange3 -si 192.168.5.14 -si cvmedia2 -si 192.168.5.3
qoperation execscript -sn DataInterfacePairConfig -si add -si printsrv1 -si 192.168.5.15 -si cvmedia2 -si 192.168.5.3
qoperation execscript -sn DataInterfacePairConfig -si add -si printsrv2 -si 192.168.5.16 -si cvmedia2 -si 192.168.5.3
qoperation execscript -sn DataInterfacePairConfig -si add -si printsrv3 -si 192.168.5.17 -si cvmedia2 -si 192.168.5.3

Save the batch file

We want to run in this batch file in the CMD shell

First you have to log into the Qscript scripting engine with your creds for the commserv
Type:
         "c:\Program Files\CommVault\Simpana\Base\qlogin.exe"
enter your



Then run your batch file.
C:\TEMP>addpairs.bat




Comments

Popular posts from this blog