Sun Update Connection - Enterprise 1.0 User's Guide

Saving Inventories

ProcedureTo Save an Inventory

In this procedure, you save an inventory of a host or of a group. Saving an inventory allows you to restore a host to a previous state if needed, or to clone the inventory of a host or a group onto another host (see Restoring Managed Hosts). Sun Update Connection – Enterprise automatically saves inventories before deploying a job on a host. Automatic inventories have this naming convention:

Use this procedure to save an inventory record with a meaningful name.

Before You Begin

Before saving an inventory, you should run the Check System predefined profile on the host or group. This will ensure that the saved inventory does not have dependency issues. If you will be managing Solaris hosts, you should run the Check Withdrawn Patches profile. This will replace withdrawn Solaris patches with appropriate operating software. See Chapter 7, System Management Profiles.

  1. From the Hosts list, select a single host or a group.

  2. Do one of the following:

    • From the tool bar, click the Save Inventory to File button

    • Right-click the selected host or group and choose Save Inventory ->To File.

    • From the Hosts menu, choose Save Inventory ->To File.

      A dialog box opens with the date entered in the text-entry box.

  3. Type a name for this inventory and then click OK.


Example 8–1 Saving a Host Inventory with the CLI

The CLI command to save host inventory saves a record of the inventory of a single host. See Save Host Inventory (-shi) Command.


#! /bin/bash

echo -n “Enter your user name:” 
read user 
echo -n “Enter your password:” 
read password 

echo “The list of hosts is:” 
uce_cli -lah -u “$user” -p “$password” 
echo -n “Copy the name of the host whose inventory you want to save:” 
read hostname 
echo -n “Type a name for the inventory record:” 
read savedInven 

uce_cli -shi -h “$hostname” -s “$savedInven” -u “$user” -p “$password”


Example 8–2 Saving a Group Inventory with the CLI

The CLI command to save group inventory saves a record of the inventory for each host of the group. This does not create a composite record. It creates a separate file for each host.The files are named according to this convention hostname_suffix_mmddyyyytime. You create the suffix, a name or number to identify this as a group inventory save. See Save Group Inventory (-sgi) Command.


#! /bin/bash

echo -n “Enter your user name:” 
read user 
echo -n “Enter your password:” 
read password 

echo “The list of groups is:” 
uce_cli -lg -u “$user” -p “$password” 
echo -n “Copy the name of the group whose hosts inventories you want to save:” 
read groupname 
echo -n “Type a group suffix for the inventory saves:” 
read suffix 

uce_cli -sgi -g “$groupname” -sn “$suffix” -u “$user” -p “$password”