Sun Management Center Change Manager 1.0.1 Administration Guide

- Previous: Chapter 7 Monitoring Jobs (Tasks)
- Next: Chapter 9 Maintaining the Sun Management Center Topology (Tasks)

# Chapter 8 Maintaining the Change Manager Repository (Tasks)

The Change Manager repository is organized as a file manager. You can traverse through nested folders to view folder contents and file properties. You can also create folders and files.

Change Manager objects have properties associated with them. You can change properties for files by using the browser interface. You can change properties for files and folders by using the command-line interface.

The following topics are discussed in this chapter:

- Maintaining the Change Manager Repository by Using the Browser Interface (Task Map)

- Maintaining the Change Manager Repository by Using the Browser Interface

- Maintaining the Change Manager Repository by Using the Command-Line Interface (Task Map)

- Maintaining the Change Manager Repository by Using the Command-Line Interface

To perform operations, such as installation, update, and audit, go to the Set Up Hosts & Jobs section. See Chapter 5, Installing Solaris Flash Archives on Managed Hosts (Tasks) and Chapter 6, Auditing Software Configurations (Tasks).

# Maintaining the Change Manager Repository by Using the Browser Interface (Task Map)

The following table identifies the procedures you need to maintain files in the Change Manager repository.

Task | Description | For Instructions
--- | --- | ---
Access the Set Up Files section and folder. | Access the Set Up Files section and the appropriate folder in the Change Manager repository. | See How to Access the Set Up Files Section and Appropriate Folder (Web Browser).
Create a folder. | Create a folder in the Change Manager repository. | See How to Create a Folder (Web Browser).
Rename a file or folder. | Rename a file or folder in the Change Manager repository. | See How to Rename a File or Folder (Web Browser).
Export a file. | Export a file from the Change Manager repository. | See How to Export a File From the Change Manager Repository (Web Browser).
Create a copy of a file. | Create a copy of a file in the current folder. | See How to Create a Copy of a File (Web Browser).
Move files and folders. | Move files and folders to another folder in the Change Manager repository. | See How to Move Files and Folders to Another Folder (Web Browser).
Delete files and folders. | Delete files and folders from the Change Manager repository. | See How to Delete Files and Folders (Web Browser).
View folder contents. | View the contents of a folder. | See How to View Folder Contents (Web Browser).
View or modify file properties. | View or modify the properties of files in the repository. | See How to View or Modify File Properties (Web Browser).

# Maintaining the Change Manager Repository by Using the Browser Interface

This section describes how to use the browser interface to manage the file hierarchy of the Change Manager repository.

Suffixes of file names in the Change Manager repository must reflect the type of file. The suffixes are as follows:

- `.bmft` for manifests

- `.brul` for audit rules files

- `.cmsp` for shared profiles

- `.flar` for Solaris Flash archives

- `.miniroot` for Solaris boot images

- `.txt` for reports

When you use the browser interface to name files in the repository, the appropriate suffix is automatically added to the file name you specify. However, if you specify the appropriate suffix in the file name, the name is used as-is.

For example, if you name a report file `cm08.status`, then the name of the report stored in the repository automatically becomes `cm08.status.txt`. If, however, you name the file `cm08.status.txt`, no `.txt` suffix is added because it is already the last part of the file name.

Note –

When you use the command-line interface to name files in the repository, you must manually specify the suffix that indicates the type of the file.

To learn how to navigate through the browser interface, see Appendix A, Change Manager Browser Interface Navigation (Reference).

## How to Access the Set Up Files Section and Appropriate Folder (Web Browser)

Note that the top of the Set Up Files section hierarchy is a folder.

1. To go to the Set Up Files section, click the Set Up Files tab in the general links area.

   The top-level Set Up Files page shows a table, which can contain files and folders. The table is a file manager.

2. Drill down to the appropriate folder.

   Click a folder name to go into that folder. Then, view the folder's contents. Continue to click folder names until you reach the folder or file you want.

## How to Create a Folder (Web Browser)

Note that the top of the Set Up Files section hierarchy is a folder.

1. If you are not already in the appropriate folder, see How to Access the Set Up Files Section and Appropriate Folder (Web Browser).

2. From the File Actions menu, choose New Folder.

3. Supply a folder name.

   For example, create a folder named `apache` in which to store objects related to the Apache web server.

4. Click Create to create the folder, return to the parent folder, and see the new folder.

   Click Cancel to return to the previous page.

## How to Rename a File or Folder (Web Browser)

The rename action can be taken on one file or folder at a time.

1. If you are not already in the appropriate folder, see How to Access the Set Up Files Section and Appropriate Folder (Web Browser).

2. Select the object to rename from the table.

3. From the File Actions menu, choose Rename.

   A page appears that shows the current name of the folder or file.

4. Supply a new file name or new folder name in the New Name field.

   If the name you supply does not include the proper suffix, the application adds the suffix for you.

5. Click Rename to change the name of the folder or file in the Change Manager repository.

   Click Cancel to return to the previous page.

## How to Export a File From the Change Manager Repository (Web Browser)

You can use the browser interface to export only one file at a time.

Note –

Folders cannot be exported. Only files can be exported.

1. If you are not already in the appropriate folder, see How to Access the Set Up Files Section and Appropriate Folder (Web Browser).

2. To select the file to export, click the checkbox next to the file name.

3. From the File Actions menu, choose Export File.

   A page appears that shows the name of the file to export.

4. Supply a path name to the place outside of the repository to copy the file.

5. Click Export to copy the file outside of the repository.

   Click Cancel to return to the previous page.

## How to Create a Copy of a File (Web Browser)

You can create a copy of a shared profile or an audit rules file only. You can use the browser interface to copy only one file at a time.

The copy of the file must be created in the same folder as the original file. To simulate the creation of a copy of a file in another folder, do the following:

1. Use the Copy File action to create the copy (described in this section).

2. Use the Move action to move the copy to another folder (described in the next section).

1. If you are not already in the appropriate folder, see How to Access the Set Up Files Section and Appropriate Folder (Web Browser).

2. To select the file to copy, click the checkbox next to the file name.

3. From the File Actions menu, choose Copy File.

   A page appears that shows the name of the file to copy.

4. Supply a file name for the copy.

   The copy of the file must be created in the same folder as the original file.

5. Click Copy to create the copy of the file.

   Click Cancel to return to the previous page.

## How to Move Files and Folders to Another Folder (Web Browser)

1. If you are not already in the appropriate folder, see How to Access the Set Up Files Section and Appropriate Folder (Web Browser).

2. To select the files and folders to move, click the checkbox next to the file and folder names.

3. From the File Actions menu, choose Move.

   A page appears that shows the name of the files and folders to move.

4. Supply a path name to the destination folder in the Change Manager repository.

5. Click Move to move the files and folders to the other folder.

   Click Cancel to return to the previous page.

## How to Delete Files and Folders (Web Browser)

Folders must be empty before you delete them.

1. If you are not already in the appropriate folder, see How to Access the Set Up Files Section and Appropriate Folder (Web Browser).

2. To select the files and folders to delete, click the checkbox next to the file and folder names.

3. From the File Actions menu, choose Delete.

   A page appears that shows the names of the files and folders to delete from the repository.

4. Click Delete to delete the files and folders.

   Click Cancel to return to the previous page.

## How to View Folder Contents (Web Browser)

1. If you are not already in the appropriate folder, see How to Access the Set Up Files Section and Appropriate Folder (Web Browser).

   A page appears that shows the contents of the folder.

2. Click Cancel to return to the previous page.

## How to View or Modify File Properties (Web Browser)

This procedure describes how to use the browser interface to view and modify file properties in the Change Manager repository. The browser interface shows properties and their values on property pages for the object. To view an object's property page, click the name of the object.

1. If you are not already in the appropriate folder, see How to Access the Set Up Files Section and Appropriate Folder (Web Browser).

2. Click the file name to access the file's property page to do either of the following:

   - View the file's properties.

     The property pages for a manifest and a report are read-only.

     Click Cancel to return to the file's parent folder.

   - Modify the file's property values.

     Click Save to save the property value changes and return to the file's parent folder.

     Click Cancel to return to the file's parent folder.

# Maintaining the Change Manager Repository by Using the Command-Line Interface (Task Map)

The following table identifies the procedures you need to manage files in the Change Manager repository. See the changemgr(1MCM) man page.

Task | Description | For Instructions
--- | --- | ---
Create a folder. | Create a folder in the Change Manager repository. | See How to Create a Folder (Command Line).
Rename a file or folder. | Rename a file or folder in the Change Manager repository. | See How to Rename a File or Folder (Command Line).
Export a file. | Export a file from the Change Manager repository. | See How to Export Files to Another System (Command Line).
Move files and folders. | Move files and folders to another folder in the Change Manager repository. | See How to Move Files and Folders to Another Folder (Command Line).
Delete files and folders. | Delete files and folders from the Change Manager repository. | See How to Delete Files and Folders (Command Line).
View folder contents. | View the contents of a folder. | See How to View Folder Contents (Command Line).
View file properties. | View the properties of files in the repository. | See How to View File or Folder Properties (Command Line).
Modify file properties. | Modify the properties of files in the repository. | See How to Modify File or Folder Properties (Command Line).

# Maintaining the Change Manager Repository by Using the Command-Line Interface

This section describes how to use the command-line interface to manage the file hierarchy of the Change Manager repository.

## How to Create a Folder (Command Line)

Note –

The top of the Set Up Files section hierarchy is a folder.

1. Determine where to create the folder.

   For example, create a folder in the `web-server` folder.

2. Create and name the folder.

       $ changemgr mkdir [ -u username ] [ -p file ] reldirpath ...

   `-u` username

     Specifies the user name to authenticate. If this option is not specified, the user is the current UNIX user.

   `-p` file

     file consists of a single line, which contains the password. If file is `-`, then the user can supply the password as standard input.

     If the `-p` option is not supplied, then the `changemgr` command prompts the user for his password.

   reldirpath

     Specifies the path to a folder that is relative to the top of the Change Manager repository.

   Choose a meaningful name that indicates the types of files the folder contains. For example, create a folder named `apache` in which to store objects related to the Apache web server.

### Example—Creating a Folder

Suzi creates the `apache` folder in the `web-server` folder.

    $ changemgr mkdir -p .pfile /web-server/apache

## How to Rename a File or Folder (Command Line)

The rename action can be taken on one file or folder at a time.

1. Determine which file or folder to rename.

   For example, rename the `web-server/apache` folder to be `web-server/ApacheServer`.

2. Rename the file or folder.

       $ changemgr filemove [ -u username ] [ -p file ] old_relfilepath.type \
       new_relfilepath.type

   relfilepath

     Specifies the path to a file or folder. The path is relative to the top of the Change Manager repository.

   .type

     Specifies the file name suffix that represents the file type. File type suffixes are as follows:

     - `.bmft` for manifests

     - `.brul` for audit rules files

     - `.cmsp` for shared profiles

     - `.flar` for archives

     - `.miniroot` for boot images

     - `.txt` for reports

     Folders do not use a file suffix.

   For descriptions of the other options, see How to Create a Folder (Command Line).

### Example—Renaming a File or Folder

Suzi renames the `web-server/apache` folder to be `web-server/ApacheServer`.

    $ changemgr filemove /web-server/apache \
    /web-server/ApacheServer

## How to Export Files to Another System (Command Line)

Only files, not folders and Solaris boot images, can be exported.

1. Determine which files to export.

   For example, export the `/web-server/apache/host1.bmft` file to `host2:/home/suzi`.

2. Export the files:

   - Export a single file, `relfilepath`, from the repository as `filepath`.

          $ changemgr export [ -u username ] [ -p file ] relfilepath filepath

   - Export one or more files to the specified folder, `dirpath`, outside of the repository.

         $ changemgr export [ -u username ] [ -p file ] relfilepath ... dirpath

   dirpath

     Specifies an absolute or relative path to a directory. This directory is not within the Change Manager repository.

   filepath

     Specifies an absolute or relative path to a file. This file path is not within the Change Manager repository.

   relfilepath

     Specifies the path to a file, not including a folder, that is relative to the top of the Change Manager repository.

   For descriptions of the other options, see How to Create a Folder (Command Line).

### Example—Exporting a File to Another System

Suzi exports the `/web-server/apache/host1.bmft` file to her home directory, `/net/host2/home/suzi`.

    $ changemgr export /web-server/apache/host1.bmft \
    /net/host2/home/suzi/host1.bmft

### Example—Exporting Files to Another System

Suzi exports the `/web-server/apache/host1.bmft` file and the `/web-server/apache/host2.bmft` file to her home directory, `/net/host2/home/suzi`.

    $ changemgr export /web-server/apache/host1.bmft \
    /web-server/apache/host2.bmft /net/host2/home/suzi

## How to Move Files and Folders to Another Folder (Command Line)

1. Determine which files and folders to move.

   For example, move the `web-server/host1.bmft` file and the `web-server/host2.bmft` file to the `web-server/ApacheServer` folder.

2. Move the files and folders to another folder in the Change Manager repository.

       $ changemgr filemove [ -u username ] [ -p file ] relfilepath ... \
       reldirpath

   relfilepath

     Specifies the path to a file or folder that is relative to the top of the Change Manager repository.

   For descriptions of the other options, see How to Create a Folder (Command Line).

### Example—Moving Files and Folders to Another Folder

Suzi moves the `web-server/host1.bmft` file and the `web-server/host2.bmft` file to the `web-server/ApacheServer` folder.

    $ changemgr filemove /web-server/host1.bmft \
    /web-server/host2.bmft /web-server/ApacheServer

## How to Delete Files and Folders (Command Line)

Folders must be empty before you delete them.

1. Determine which files and folders to delete.

   For example, delete the `web-server/host1.bmft` file, the `host2.bmft` file, and the `web-server/ApacheServer` folder.

2. Delete the files and folders.

       $ changemgr delete [ -u username ] [ -p file ] relfilepath ...

   relfilepath

     Specifies the path to a file or folder that is relative to the top of the Change Manager repository.

   For descriptions of the other options, see How to Create a Folder (Command Line).

### Example—Deleting Files and Folders

Suzi deletes the `web-server/host1.bmft` file, the `host2.bmft` file, and the `web-server/ApacheServer` folder.

    $ changemgr delete /web-server/host1.bmft \
    /web-server/host2.bmft /web-server/ApacheServer

## How to View Folder Contents (Command Line)

A folder can contain files and other folders.

To modify folder properties, see How to Modify File or Folder Properties (Command Line).

1. Determine which folder to view.

   For example, view the contents of the `web-server/ApacheServer` folder.

2. View the folder contents.

       $ changemgr files [ -u username ] [ -p file ] [ -l ] [ -d ] [ -R ] \
       [ -o format ] [ relfilepath ... ]

   `-l`

     Presents detailed information in tabular form.

   `-d`

     Presents information about the folder itself, rather than about the folder's contents.

   `-R`

     Describes all the folder's descendents.

   `-o` format

     format is a blank-separated list or comma-separated list of property names. If you separate the property names with spaces, make sure that you surround the list of property names with quotes. The specified property values are displayed in a name-value format. If format is specified as `all`, then all properties are displayed. The output is suitable for programmatic parsing.

   relfilepath

     Specifies the path to a file or folder that is relative to the top of the Change Manager repository.

   For descriptions of the other options, see How to Create a Folder (Command Line).

### Example—Viewing Contents of the Root of the Repository

Suzi views the contents of the root of the Change Manager repository, which is the root folder.

    $ changemgr files

### Example—Viewing Folder Contents

Suzi views the contents of the `web-server/ApacheServer` folder.

    $ changemgr files /web-server/ApacheServer

### Example—Viewing Information About the Folder

Suzi views the information about the `web-server/ApacheServer` folder.

    $ changemgr files -d /web-server/ApacheServer

### Example—Viewing Folder Contents in Table Form

Suzi views the contents of the `web-server/ApacheServer` folder in table form.

    $ changemgr files -l /web-server/ApacheServer

### Example—Viewing Folder Contents and Contents of the Folder's Descendents

Suzi views the contents of the `web-server/ApacheServer` folder and the folder's descendents.

    $ changemgr files -R /web-server/ApacheServer

### Example—Viewing Folder Contents and Specific Properties

Suzi views the contents of the `web-server/ApacheServer` folder. She wants to see the values of the `Description` property and the `save` property for each object. Note that you can use either format shown.

    $ changemgr files -o Description,save /web-server/ApacheServer

    $ changemgr files -o "Description save" /web-server/ApacheServer

### Example—Viewing Folder Contents and All Properties

Suzi views the contents of the `web-server/ApacheServer` folder and wants to see the values of all the properties for each object.

    $ changemgr files -o all /web-server/ApacheServer

### Example—Viewing Detailed Information About the Contents and Properties of a Folder and Its Descendents

Suzi views detailed information in table form about the contents and all properties of the `web-server/ApacheServer` folder and the folder's descendents.

    $ changemgr files -l -R -o all /web-server/ApacheServer

## How to View File or Folder Properties (Command Line)

1. To view file or folder properties, see How to View Folder Contents (Command Line).

## How to Modify File or Folder Properties (Command Line)

1. Determine which file or folder properties you want to modify.

   - File – For example, modify the properties of the `web-server/ApacheServer/ApacheWebServer.flar` file.

   - Folder – For example, modify the properties of the `web-server/ApacheServer` folder.

2. To modify the properties, supply the property names and values.

       $ changemgr fileset [ -u username ] [ -p file ] [ -s name=value ]  ... \
       [ -s name ] ... relfilepath ...

   `-s` name=value

     Specifies one or more name-value pairs. name is the property name, and value is the property value. Supply this option for each property value you want to set. If value is blank, then the property is assigned an empty value.

   `-s` name

     Specifies one or more property names to delete, where name is the property name. Supply this option for each property you want to delete.

   relfilepath

     Specifies the path to a file or folder that is relative to the top of the Change Manager repository.

   For descriptions of the other options, see How to Create a Folder (Command Line).

### Example—Modifying File Properties

Suzi modifies the `Description` property of the `web-server/ApacheServer/ApacheWebServer.flar` file.

    $ changemgr fileset -s Description="Apache Web Server archive" \
    /web-server/ApacheServer/ApacheWebServer.flar

### Example—Deleting a File Property

Suzi deletes the `Description` property of the `web-server/ApacheServer/ApacheWebServer.flar` file.

    $ changemgr fileset -s Description \
    /web-server/ApacheServer/ApacheWebServer.flar

### Example—Deleting File Properties

Suzi deletes the `Description` property and the `Name` property from the `web-server/ApacheServer/ApacheWebServer.flar` file.

    $ changemgr fileset -s Description -s Name \
    /web-server/ApacheServer/ApacheWebServer.flar

### Example—Deleting a File Property From One or More Files

Suzi deletes the `Description` property from the `web-server/ApacheServer/ApacheWebServer.flar` file and the `web-server/ApacheServer/ApacheWebServer.txt` file.

    $ changemgr fileset -s Description \
    /web-server/ApacheServer/ApacheWebServer.flar \
    /web-server/ApacheServer/ApacheWebServer.txt

### Example—Modifying Folder Properties

Suzi modifies the `Description` property of the `web-server/Apache Server` folder.

    $ changemgr fileset \
    -s Description="Folder to hold Apache Web Server files" \
    /web-server/ApacheServer

- Previous: Chapter 7 Monitoring Jobs (Tasks)
- Next: Chapter 9 Maintaining the Sun Management Center Topology (Tasks)

- © 2010, Oracle Corporation and/or its affiliates