Avamar: How to use the mapall tool

Résumé: Avamar has a command-line tool called "mapall" which allows instructions to be issued to one or more nodes within the grid. This article explains how to use the tool.

Cet article concerne Cet article ne concerne pas Cet article n’est associé à aucun produit spécifique. Toutes les versions du produit ne sont pas identifiées dans cet article.

Instructions

This article demonstrates how to use the Avamar mapall tool to issue commands from the utility node to other nodes.

The mapall tool can reach Avamar nodes which are defined in the probe.xml file.

These scripts are wrappers around the standard secure shell (ssh) tools (ssh) and secure copy protocol (SCP)) and are all written in Perl.

 

The mapall, ssh and scp scripts

 

  • mapall - Sends a command to multiple nodes 
  • SSN  - A wrapper around ssh that accepts (physical) node numbers instead of IP addresses or hostname
  • SCN - A wrapper around SCP, as above
Note: Log in to the Avamar Utility Node and load the ssh keys to use ssh tools.

See the following for more information: Avamar: How to Log in to an Avamar Server and Load Various Keys.
 
 

MAPALL:

Specifying which nodes to run the command on:

To run commands on select nodes only:

To run the <command> only on nodes 0.0, 0.2 and 0.3:

mapall --nodes=0.0,0.2,0.3 <command>
 

To run the <command> on all nodes apart from the utility node and 0.0:

mapall --nodes=all+,-0.s,0.0 <command>
 

Useful flags:

Below are some useful flags which can be used with the three tools. (The flags are fully documented in the Avamar Technical Addendum)
As with any Avamar command-line task, exercise caution when running.
  • --user=<username> : Specify the user on the remote system that runs the command.
  • --verbose : Provides maximum information.
  • --quiet : Disable all messages.
  • --parallel : Runs the command on all nodes simultaneously.
  • --noerror : Do not stop if an error occurs. (This flag should always be used) For legacy reasons, mapall command execution stops if an error occurs.
  • --bg : Run the command in the background and does not wait for completion.
  • --debug : Enable extended debugging information (for example, which nodes map to which IP addresses).
  • --copy : Copies a file from the utility node to remote nodes.
  • --get : Pulls a file to the utility node from remote nodes.
  • --all : Issues the command on all the data nodes plus the utility node
  • --all+ : Issues the command on all the nodes in probe.xml, including NDMP accelerator nodes, spare nodes so forth.

 

 

MAPALL Examples:

MAPALL GET: This is the inverse of the copy command.  

Get the GSAN binary from each data node and copy it to the Avamar Utility Node to /home/admin/0.*/gsan:

mapall --noerror get 'gsan'  
 

MAPALL COPY:

Copy the /etc/hosts file to /root/etc/hosts on each data node.

mapall --noerror --user=root copy 'etc/hosts' 
 
How this works in practice:
1. The mapall copy command creates a tarball containing the specified files.
2. Uses scp to push the tarball to every node.
3. Decompresses the tarball in the users home directory.

Informations supplémentaires

SSN Examples:

Connect to node 0.1 and open an interactive shell.

ssn 0.
 

Connect to node 0.2 and issue the date command.

ssn 0.2 'date' 
 

SCN Examples:

Copy the /home/admin/gsan binary from node 0.1 to the btfix directory on the Avamar Utility Node.

scn 0.1:/home/admin/gsan ./btfix
 

Copy "testscript" from the utility node's /home/admin directory onto node 0.2 and place it as "runscript" in /data01/cur:

scn testscript 0.2:/data01/cur/runscript
 
Note: The scn command cannot be used to copy files from one data node to another data node.

Files would have to be copied using the utility node in a two-step operation, or alternatively, use scp to transfer files directly between the two nodes.

Produits concernés

Avamar, Avamar Server
Propriétés de l’article
Numéro d’article: 000156632
Type d’article: How To
Dernière modification: 01 oct. 2025
Version:  10
Trouvez des réponses à vos questions auprès d’autres utilisateurs Dell
Services de support
Vérifiez si votre appareil est couvert par les services de support.