Start a Conversation

Unsolved

This post is more than 5 years old

6082

January 8th, 2014 23:00

Avamar mccli scripting

Hello,

I have one question about the mccli tool.

Background:

We have a huge avamar installation with 105 single nodes in remote offices. So one big challange is to change for examlpe a special schedule on all of the 105 nodes without logging in to each of the nodes. All the nodes will have the same users, passwords and settings (Schedules, Datasets, Retention, ...)

So my idea was to use mccli which is installed on a seperate SLES server.

The easiest way would be the add all of the 105 nodes in the mcclicms.xml file. But I am not sure if this works as I think.

In the config file you have definded the following when you install the mccli:

 

       mcsprofile="local"

       mcsaddr="avamar"

       mcsport="7778"

       mcsuserid="MCUser"

       mcspasswd="MCUser1"

  />

So my question is if it is possible to add all of the 105 nodes in this file.

 

       mcsprofile="local"

       mcsaddr="avamar"

       mcsaddr="avamar1"

       mcsaddr="avamar2"

       ...

       mcsport="7778"

       mcsuserid="MCUser"

       mcspasswd="MCUser1"

  />

And so when I for example run

./mccli schedule edit --start=08:00 --name=Daily_Backup

each schedule Daily_Backup on all of the 105 nodes is set to start at 08:00?

As I have only one AVE for testing, I can not try this in my lab.

If this way don´t work, I would be thankfull for each other idea how to implement this.

2 Intern

 • 

137 Posts

January 9th, 2014 07:00

Hello

I dont think you can add multiple servers in the file... searching on internet i found this i hope it helps you

If Machine A is a Windows box, you can use Plink (part of PuTTY) with the -m parameter, and it will execute the local script on the remote server.

plink root@MachineB -m local_script.sh

If Machine A is a Unix-based system, you can use:

ssh root@MachineB 'bash -s' < local_script.sh

  You shouldn't have to copy the script to the remote server to run it

16 Posts

January 9th, 2014 14:00

You could develop a script that would run multiple mccli commands, each with a different server address by using the command line arguments:

--mcsaddr=STRING --mcsuserid=STRING --mcspasswd=STRING

If you are using the same usernames and passwords then those could likely be skipped and it will use the information you have specified in the preferences file.

223 Posts

January 10th, 2014 01:00

Hello,

thanks, but with this option I have to do a lot of scripting in case of a change.

As I wrote I have 105 singel nodes, and if i have a mccli command for each of the nodes I have to change 105 items if for example I want to set the schedule from 8:00 to 9:00.

So my idea is to use one mccli line command which connects to all of the nodes.

215 Posts

January 10th, 2014 05:00

You can do this by leveraging the global options applicable to all mccli calls.

For example, to run an mccli on system-1 and have it execute and return the results from system-2 do the following;

mccli server show-prop --mcsaddr=avamar-hostname --mcspasswd=MCUser1 --mcsuserid=MCUser

In your case you would need to first establish a list of the names of your 105 avamar systems and feed those through a loop to execute the appropriate mccli command(s)

A simple example would be something like I’ve shown below. If different userids and passwords are required for each system they could be added as arguments 2 & 3 in the namelist.txt file.

If all systems do share a common MCS userid/password then it can be embdded right in the mccli command itself which is what I’ve shown here.

cat namelist.txt

system-name-1

system-name-2

system-name-3

for x in $(cat namelist.txt)

do

echo “Processing Avamar system ”

mccli server show-prop --mcsaddr=$x --mcspasswdmypassword --mcsuserid=myuserid

done

Hope this helps.

1 Message

August 26th, 2015 23:00

I have a similar query regarding managing profiles on remote Avamar Grids .Is it possible to use this method to push out profiles to other Avamar Grids ?

For example we have xxx alert , xxx heartbeat , xxx jobs ,xxx system profiles that we would to push out to other Avamar grids.


These profiles will be configured with appropriate settings enabled and event codes selected.These will be on a 'mother' grid ,when operational requirements change we 'push' out from the 'mother' grid to the child grids.


Are profiles saved on the Avamar grid in .xml files ?

Thanks



1 Rookie

 • 

49 Posts

September 11th, 2015 01:00

For import/export profiles you can use a way described here:

https://community.emc.com/message/822420#822420 It works for me

207 Posts

September 11th, 2015 11:00

If you are aware of proxycp.jar script, you could use the following undocumented feature

Note : This option need same username/password on all the grids

1> Create a file, For e.g I created a file called "VBA.txt" and added two avamar grids from my lab

C:\Amol>type c:\test\vbas.txt

aevm50.asl.lab.emc.com

aevm81.asl.lab.emc.com

C:\Amol>

2> Then using following command java -jar proxycp.jar --cmd "command to invoke" --grids --filename /path/to/file/with/grid/names

C:\Amol>java -jar c:\amol\proxycp.jar --cmd "hostname -f" --grids --filename c:\test\vbas.txt

======================= Starting ProxyCP ==========================

Proxycp : v2.36

Date    : September 11, 2015 1:54:27 PM EDT

COMMAND : java -jar proxycp.jar --cmd hostname -f --grids --filename c:\test\vbas.txt

VDP/Nemo Detected : false

------------------------------------------------------------------------------------

User Name : root

Password :

================== aevm50.asl.lab.emc.com ====================

Executing : hostname -f

aevm50.asl.lab.emc.com

================== aevm81.asl.lab.emc.com ====================

Executing : hostname -f

aevm81.asl.lab.emc.com

----------------------------------------------------------------------------------------------

Closing Connection Pool : September 11, 2015 1:54:51 PM EDT

As you can see in above example I invoked "hostname -f" and it returned back the result

Note : You can use --parallel flag which will connect to several grids at the same time and provide you a faster output

Regards

Amol Powar

No Events found!

Top