Automating Host Group Management > General Utilities
  
Version 9.2.00
General Utilities
The utilities contained in this section apply to all host groups and clients irrespective of the underlying backup products that you use.
Identifying a Group’s ID
Move or Copy Clients
Organize Clients by Attribute
Move Host Group
Delete Host Group
Organize Clients into Groups by Backup Server
Merge Duplicate Backup Clients
Identifying a Group’s ID
Whenever you want to apply a change to a table in the Reporting Database, you must specify the host group’s ID in your SQL utility. For example, you need to identify host group IDs if you intend to delete a host group through the Reporting Database or if you want to use PL/SQL utilities. The host group ID that you specify in your SQL statement is very important and determines how the change is applied:
If you are not an Managed Services Provider (MSP) and you want to apply a change to a specific host group, determine the group ID for that host group. If you want to apply a change to all host groups, choose the host group ID of the top level folder, the root folder. The group ID for the root folder is always 100000.
If you are an MSP and you want to apply a change to a specific customer, choose the host group ID of that customer’s domain. If you want to apply a change to all customers, choose the group ID of the top-level root folder (ID = 100000).
For information about the root folder and domains, see the APTARE StorageConsole User’s Guide.
Finding the Group ID
To identify the unique identifier associated with a host group, take the following steps in the Portal.
1. Admin > Hosts and Domains > Hosts and Host Groups
2. In the navigation panel at the left of the Host Groups Administration window, expand the Host Groups folders.
3. Hover your mouse over the Host Group folder in which your hosts reside. The Group ID will display in a tooltip.
 
Move or Copy Clients
Description
This utility enables you to move or link large quantities of clients to different host groups. This tool accepts wildcards for the client_name_mask attribute. This utility will first validate the existence or the two group names passed as the first two parameters (see below). If the groups do not exist, the utility return an error.
Usage
execute server_mgmt_pkg.moveOrCopyClients(‘<source_host_group>’, ‘<destination_host_group>’, ‘<client_name_mask>’, <move_or_copy_flag>);
Where:
source_host_group is the full pathname to the source host group, for example /Aptare/Masters/GroupA
destination_host_group is the full pathname to the destination host group.
client_name_mask is a string that can contain wildcards (*). For example, abc* indicates all clients that have an internal_name that starts with abc. To process all clients use the value NULL (which should not be within quotes).
move_or_copy_flag is 0=copy and 1=move.
Organize Clients by Attribute
Description
This groupClientsbyAttributes utility enables you to organize clients within a host group, based on client attributes. This utility will create host groups named for each attribute value, underneath a parent host group, as shown in the following example.
Example of Organizing Clients by Geographical Location:
Create a host group named Geography. This will be the destination group that will be used to organize the clients by location.
Then, create an attribute named Geography.
For a subset of a host group’s clients, set their Geography attribute value to London and for another subset of clients, set their Geography attribute to New York.
Use the following groupClientsbyAttributes utility to organize the clients that have a Geography attribute configured.
execute server_mgmt_pkg.groupClientsbyAttributes(100000, 102398, 1, StringObjectListType(stringObjectType('Geography')));
Where 100000 is the group ID of the root group, Global; 102398 is the ID of the Geography group you just created.
So, for this example, the clients in the Global (source) group are organized into the following host group hierarchy:
 
Additional References:
Usage
execute server_mgmt_pkg.groupClientsbyAttributes(<source_Group_ID>, <destination_group_ID>, <cascade_Source_Group>, StringObjectListType(<attribute_List>));
Where:
source_Group_ID is the numeric identifier of the host group for which you want to group the clients. See Identifying a Group’s ID for the steps for finding a group ID.
destination_group_ID is the numeric identifier of the group under which you want to group the clients.
cascade_Source_Group is a numeric flag that indicates if you want this utility to process the source host group’s sub-groups and organize those clients in the destination group.
attribute_List is a comma-separated list of attribute names, each enclosed in straight single quotes. These names are used to create the sub-groups that organize the clients underneath the source group.
Move Host Group
Description
This utility enables you to move a host group and all of its hierarchical contents to another host group.
Usage
execute server_mgmt_pkg.moveServerGroup(‘<source_host_group>’, ‘<destination_host_group>’);
Where:
source_host_group is the full pathname to the source host group, for example /Aptare/Masters/GroupA. Be sure to use the host group name, not the host group ID.
destination_host_group is the full pathname to the destination host group. Be sure to use the host group name, not the host group ID.
Delete Host Group
Description
There are some occasions where you may wish to remove the entire contents of a host group, including any sub-groups within this group and any clients under the hierarchy. This utility allows administrators to perform this type of delete operation.
 
CAUTION: IF YOU USE THIS COMMAND TO REMOVE A HOST GROUP, AND IF CLIENTS UNDER THE HOST GROUP HIERARCHY DO NOT EXIST IN ANY OTHER GROUP, THE CLIENTS AND ALL OF THEIR ASSOCIATED CONFIGURATIONS WILL BE PERMANENTLY REMOVED FROM THE DATABASE.
Usage
execute server_group_package.deleteEntireGroupContents(100, <parent_group_id>, <group_to_remove_id>);
Where:
parent_group_id is the group id of the parent group which contains the group to be deleted.
group_to_remove_id is the group id of the group to be deleted.
Organize Clients into Groups by Backup Server
This utility can be used for any backup product, such as IBM TSM, Symantec Backup Exec, or HP Data Protector.
Description
This utility enables you to create a hierarchy of servers and links all clients that are members of a server into the respective server group.
For example, in an IBM Tivoli Storage Manager environment if you have two IBM Tivoli Storage Manager servers called TSM1, TSM2, this utility creates two host groups, TSM1 and TSM2, and links the IBM Tivoli Storage Manager server’s clients into the corresponding IBM Tivoli Storage Manager host group.
Usage
execute common_package.moveClientsIntoServerGroups( <source_group_id>,<destination_group_id>, <move_or_copy_flag>, <latest_server_only>);
 
Example:
exec common_package.moveClientsIntoServerGroups(100000, 100010, 1, 1), ;
Where:
source_group_id is the internal group ID of the group hierarchy to traverse.
destination_group_id is the group ID in which host groups by management server will be created. APTARE recommends that you create a host group under source_group_id called <vendor_name> Servers and use the group ID of this new host group for the second parameter.
 
When you organize by server, if a host group exists anywhere under the source group hierarchy with the name of that server, the routine associates the clients with that folder and does not create a new folder under the destination folder. This association occurs whether you explicitly specify the destination folder or if the destination is NULL. However, if you pass a source folder that is at a lower level, the routine only checks for a folder under that hierarchy. If you specify NULL as the destination folder, the routine creates a host group under the source_group_id called Master Servers.
move_or_copy_flag can be set to 0=Link (copy) clients or 1=Move clients. If set to 0, the utility links the clients to their respective host groups and keeps the clients in their original group location. If set to 1, the utility moves all clients from the source host group and to their respective host groups.
The utility processes and organizes all clients of the source group hierarchy into the target server grouping. However, if the move_or_copy flag is set to 1, the utility removes only clients in the top level source_group_id group—and does not remove those already organized in lower-level sub-groups.
latest_server_only, when set to 1, indicates the last server to back up the client; otherwise, set this flag to 0.
Merge Duplicate Backup Clients
This merge utility can be used for clients that have been collected from the following backup products: Symantec NetBackup, EMC NetWorker, and CommVault Simpana.
Description
Under certain circumstances, backup clients may have duplicate entries in the StorageConsole database. This utility enables you to merge the data of clients that appear more than once in the database.
In most cases, it is not necessary to shut down the data receiver while the client records are being merged. Although not required, it is recommended that you shut down the data receiver before executing this utility so that data will not continue to be collected for the hosts that are being merged.
Merging of NetBackup master servers is not supported.
Usage
execute duplicate_package.mergeDuplicateServers(<‘host_grp’>,<host_name_type>);
 
Example:
exec duplicate_package.mergeDuplicateServers(‘/Corp’,1);
 
Where:
host_grp is the explicit host group path and name.
host_name_type indicates whether to use only the host’s base name while finding duplicates, or use the fully qualified name. 0 = fully qualified host name, 1 = host base name.
 
Example of a host base name: QAhost1
Example of a fully qualified host name: QAhost1.yourcompany.com