Sun Management Center Change Manager 1.0.1 Reference Manual

- Previous: Sun Management Center Change Manager 1.0.1 Reference Manual
- Next: Change Manager File Formats

# Change Manager System Administration Commands

## bart(1MCM)

NAME | SYNOPSIS | DESCRIPTION | OPTIONS | OPERANDS | OUTPUT | EXIT STATUS | EXAMPLES | ATTRIBUTES | SEE ALSO

#### NAME

bart– basic audit reporting tool

#### SYNOPSIS

`/usr/bin/bart create` [ `-n` ] [ `-R` root_directory ] [ `-r` rules_file | `-` ]
`/usr/bin/bart create` [ `-n` ] [ `-R` root_directory ] `-I` [ file_name …]
`/usr/bin/bart compare` [ `-i` attribute ] [ `-p` ] [ `-r` rules_file | `-` ] control-manifest test-manifest

#### DESCRIPTION

The bart(1MCM) command is a tool that performs a file-level check of the software contents of a system. Users can optionally specify the files to track and the types of discrepancies to flag by means of a rules file. See bart_rules(4CM).

The `bart` command performs two basic functions:

`bart create`

  The manifest generator tool takes a file-level ``snapshot'' of a system. The output is a catalog of file attributes referred to as a ``manifest.'' See bart_manifest(4CM).

  Users can specify the list of files to be cataloged in three ways. Use `bart create` with no options, specify the files by name on the command line, or create a rules file with directives that specify which the files to monitor. See bart_rules(4CM).

  By default, the manifest generator catalogs all attributes of all files in the root (`/`) file system. File systems mounted on the root file system are cataloged only if they are of the same type as the root file system.

  For example, `/`, `/usr`, and `/opt` are separate UFS file systems. `/usr` and `/opt` are mounted on `/`. Therefore, all three file systems are cataloged. However, `/tmp`, also mounted on `/`, is not cataloged because it is a TMPFS file system. Mounted CD-ROMs are not cataloged since they are HSFS file systems.

`bart compare`

  The report tool compares two manifests. The output is a list of per-file attribute discrepancies. These discrepancies are the differences between two manifests: a control manifest and a test manifest. A discrepancy is a change to any attribute for a given file cataloged by both manifests. Note that a new file or a deleted file in a manifest is reported as a discrepancy.

  The reporting mechanism provides two types of output: verbose and programmatic. Verbose output is localized and presented on multiple lines, while programmatic output is more easily parsable by other programs. See OUTPUT.

  By default, the report tool generates verbose output where all discrepancies are reported except for modified directory timestamps (the `dirmtime` attribute).

  Note –

  To ensure consistent and accurate comparison results, both control-manifest and test-manifest must be built with the same rules file.

Use the rules file to ignore specified files or subtrees when you generate a manifest or compare two manifests. Users can compare manifests from different perspectives by re-running the `bart compare` command with different rules files.

#### OPTIONS

The following options are supported:

`-i` attribute ...

  Specifies the file attributes to be ignored globally. This option produces the same behavior as supplying the file attributes to a global `IGNORE` keyword in the rules file. See bart_rules(4CM).

`-I` [file_name...]

  Inputs list of files. The file list can be specified at the command line or read from standard input.

`-n`

  Prevents computation of content signatures for all regular files in the file list.

`-p`

  Displays manifest comparison output in ``programmatic mode,'' which is suitable for programmatic parsing. The output is not localized.

`-r` rules_file

  Uses rules_file to specify which files and directories to catalog, and to define which file attribute discrepancies to flag. If rules_file is `-`, then the rules are read from standard input. See bart_rules(4CM) for the definition of the syntax.

`-R` root_directory

  Specifies the root directory for the manifest. All paths specified by the rules, and all paths reported in the manifest, are relative to root_directory.

#### OPERANDS

The following operands are supported:

control-manifest

  Manifest created by `bart create` on the control system.

test-manifest

  Manifest created by `bart create` on the test system.

#### OUTPUT

The `bart create` and `bart compare` commands write output to standard output, and write error messages to standard error.

The `bart create` command generates a system manifest. See bart_manifest(4CM).

When the `bart compare` command compares two system manifests, it generates a list of file differences. By default, the comparison output is localized. However, if the `-p` option is specified, the output is generated in a form that is suitable for programmatic manipulation.

#### Default Format

    filename
    	attribute	control:xxxx test:yyyy

filename

  Name of the file that differs between control-manifest and test-manifest. For file names that contain embedded whitespace or newline characters, see Quoting Syntax in bart_manifest(4CM).

attribute

  The name of the file attribute that differs between the manifests that are compared. xxxx is the attribute value from control-manifest, and yyyy is the attribute value from test-manifest. When discrepancies for multiple attributes occur for the same file, each difference is noted on a separate line.

The following default output shows the attribute differences for the `/etc/passwd` file. The output indicates that the `size`, `mtime`, and `contents` attributes have changed.

    /etc/passwd:
      size  control:74  test:81
      mtime  control:3c165879  test:3c165979
      contents  control:daca28ae0de97afd7a6b91fde8d57afa
    	test:84b2b32c4165887355317207b48a6ec7

#### Programmatic Format

    filename attribute control-val test-val [attribute control-val test-val]*

filename

  Same as filename in the default format.

attribute control-val test-val

  A description of the file attributes that differ between the control and test manifests for each file. Each entry includes the attribute value from each manifest. See bart_manifest(4CM) for the definition of the attributes.

Each line of the programmatic output describes all attribute differences for a single file.

The following programmatic output shows the attribute differences for the `/etc/passwd` file. The output indicates that the `size`, `mtime`, and `contents` attributes have changed.

    /etc/passwd size 74 81 mtime 3c165879 3c165979
    	contents daca28ae0de97afd7a6b91fde8d57afa 84b2b32c4165887355317207b48a6ec7

#### EXIT STATUS

#### Manifest Generator

`0`

  Success

`1`

  Non-fatal error when processing files; for example, permission problems

`>1`

  Fatal error; for example, invalid command-line options

#### Report Tool

`0`

  No discrepancies reported

`1`

  Discrepancies found

`>1`

  Fatal error executing comparison

#### EXAMPLES

##### Example 1 Creating a Default Manifest Without Computing Checksums

The following command line creates a default manifest, which consists of all files in the `/` file system. The `-n` option prevents computation of checksums, which causes the manifest to be generated more quickly.

    bart create -n

##### Example 2 Creating a Manifest for a Specified Subtree

The following command line creates a manifest that contains all files in the `/home/nickiso` subtree.

    bart create -R /home/nickiso

##### Example 3 Creating a Manifest by Using Standard Input

The following command line uses output from the find(1) command to generate the list of files to be cataloged. The `find` output is used as input to the `bart create` command that specifies the `-I` option.

    find /home/nickiso -print | bart create -I

##### Example 4 Creating a Manifest by Using a Rules File

The following command line uses a rules file, `rules`, to specify the files to be cataloged.

    bart create -r rules

##### Example 5 Comparing Two Manifests and Generating Programmatic Output

The following command line compares two manifests and produces output suitable for parsing by a program.

    bart compare -p manifest1 manifest2

##### Example 6 Comparing Two Manifests and Specifying Attributes to Ignore

The following command line compares two manifests. The `dirmtime`, `lnmtime`, and `mtime` attributes are not compared.

    bart compare -i dirmtime lnmtime mtime manifest1 manifest2

##### Example 7 Comparing Two Manifests by Using a Rules File

The following command line uses a rules file, `rules`, to compare two manifests.

    bart compare -r rules manifest1 manifest2

#### ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE | ATTRIBUTE VALUE
--- | ---
Availability | SUNWbart
Interface Stability | Evolving

#### SEE ALSO

find(1), bart_manifest(4CM), bart_rules(4CM), attributes(5)

SunOS 5.9 Last Revised 18 February 2003

NAME | SYNOPSIS | DESCRIPTION | OPTIONS | OPERANDS | OUTPUT | EXIT STATUS | EXAMPLES | ATTRIBUTES | SEE ALSO

## changemgr(1MCM)

NAME | SYNOPSIS | DESCRIPTION | OPTIONS | OPERANDS | SUBCOMMANDS | SEE ALSO | EXAMPLES

#### NAME

changemgr– Sun Management Center Change Manager command-line interface

#### SYNOPSIS

`/opt/SUNWichange/bin/changemgr` command [options] [operands]

#### DESCRIPTION

The changemgr(1MCM) command is the command-line interface for the Sun Management Center Change Manager, henceforth referred to as Change Manager. This command-line interface performs the same operations that can be performed by using the browser user interface, such as software deployment tasks and system audit tasks.

Change Manager commands must be run by an authenticated user.

The command-line interface can be used to initiate a Change Manager session. A Change Manager session is a subshell in which you can run Change Manager commands as an authenticated user. You authenticate when you initiate the session. All operations run within the session are owned by the authenticated user.

The command-line interface can also run custom scripts that execute multiple Change Manager commands. The script support facilitates the execution of multiple Change Manager operations. Authentication is performed once for the script instead of once per command-line invocation.

#### OPTIONS

The `changemgr` command supports several command-line options.

#### Authentication Options

Other than the `changemgr help` commands, all commands must be authenticated. In the context of a session, the session's authenticated identity is used.

The following authentication options are supported:

`-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.

`-u` username

  Specifies the user name to authenticate. If the `-u` option is not supplied, the user is the current UNIX real user ID, as reported by id(1M).

#### Common Options

These options are used by more than one command:

`-d` domain

  Specifies the Sun Management Center administrative domain on which to operate. In the context of a session, the default is the domain specified by the session, if any. By default, domain is the user's home domain.

`-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.

  The output lists each file or folder on a line by itself. The name can be followed by property lines, which consist of a tab, property name, equals sign, and a property value. Each file or folder entry is separated from the next entry by a blank line.

  For example, the output is arranged as follows:

      path
              name=value
              ...

      path
              name=value
              ...

      ...

#### OPERANDS

The following operands are supported:

filepath

  An absolute path to a file or a relative (to the current directory) path to a file. This file path is not in the Change Manager repository.

relpath

  Path to a file-like object (including a folder) that is relative to the top of the Change Manager repository.

relfilepath

  Path to a file-like object (not including a folder) that is relative to the top of the Change Manager repository.

reldirpath

  Path to a folder-like object that is relative to the top of the Change Manager repository.

`.type`

  File name suffix that specifies the file type. File type suffixes are: `.flar` for archives, `.miniroot` for boot images, `.bmft` for manifests, `.brul` for audit rules files, `.txt` for reports, and `.cmsp` for shared profiles. Folders do not require a file name suffix.

topopath

  Path to a topology object (including a host group) that is relative to the top of the selected administrative domain.

hostpath

  Path to a managed host that is relative to the top of the selected administrative domain.

hostname

  Network name of a host, for example, `netherfield.sun.com`.

grouppath

  Path to a host group that is relative to the top of the selected administrative domain.

#### SUBCOMMANDS

The following sections describe the `changemgr` subcommands.

#### Sessions

`changemgr session` [`-u` username] [`-p` file] [`-d` domain] [command [command-arguments]]

  Run the specified command in the context of a Change Manager session so that individual commands in a script (command) do not need authentication and startup overhead. The authentication and startup overhead is amoritized over all of the commands.

  command is normally an sh(1) or ksh(1) script that contains Change Manager commands in the form of the command-line interface.

  If command is `sh` or `ksh`, a subshell is spawned to create an interactive session. You are required to authenticate to initiate the session.

  If command is not supplied, then an interactive subshell of `$SHELL` starts, if known to be compatible. If `$SHELL` is not compatible, then an interactive `ksh` subshell starts.

  Note –

  The csh(1) shell cannot be used to run scripts or initiate a session.

#### File Management Operations

`changemgr mkdir` [`-u` username] [`-p` file] `new_reldirpath`...

  Create one or more folders in the Change Manager repository.

`changemgr import` [`-u` username] [`-p` file] `filepath`.[`type`] `relfilepath.type`

  Import a single file, `filepath`.[`type`], to the repository as `relfilepath.type`. The file being imported can have any file suffix, but the file name in the repository must have the appropriate suffix.

`changemgr import` [`-u` username] [`-p` file] `filepath.type`... `reldirpath`

  Import one or more files to the specified folder, `reldirpath`, in the repository.

  Because this command uses the original file names when creating the files in the repository, the original names must have the appropriate suffixes.

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

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

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

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

`changemgr files` [`-u` username] [`-p` file] [`-l`] [`-d`] [`-R`] [`-o` format] [`relpath`...]

  List the specified files and folders, or the contents of the specified folders. When no path is specified, the objects in the root of the repository are listed.

  The default output format is one file or folder name per line.

  `-d`

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

  `-l`

    Presents more information in tabular output. This output is not suitable for programmatic parsing.

  `-R`

    Recursively lists the contents of a folder.

`changemgr delete` [`-u` username] [`-p` file] `relpath`...

  Delete the specified files and folders.

  Note that only empty folders can be deleted.

`changemgr fileset` [`-u` username] [`-p` file] [`-s` name=value]... [`-s` name]... `relpath`...

  Set properties for the specified files and folders by using the `-s` name=value option. The `-s` option with just the property name deletes the property.

  `-s` name=value

    Specifies one or more name`=`value pairs. name is the property name, and value is the property value. Supply the `-s` 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 the `-s` option for each property you want to delete.

`changemgr filemove` [`-u` username] [`-p` file] `old_relpath`... `new_dirpath`

  Move files and folders to another folder. The original file and folder names are unchanged. The destination folder must already exist.

  `old_relpath` can be a folder or a file.

`changemgr filemove` [`-u` username] [`-p` file] `old_relpath.type` `new_relpath.type`

  Rename a file or a folder. The type of the renamed file must stay the same.

#### Topology Operations

`changemgr mkgroup` [`-u` username] [`-p` file] [`-d` domain] `new_grouppath`...

  Create one or more host groups.

`changemgr hosts` [`-u` username] [`-p` file] [`-l`] [`-g`] [`-R`] [`-d` domain] [`-o` format] [`topopath`...]

  List information about `topopath`, which represents the specified managed hosts or host groups. With no path arguments, information is listed about the managed hosts and host groups in the root of the administrative domain.

  The default output format is one managed host or host group name per line.

  `-g`

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

  `-l`

    Presents more information in tabular output. This output is not suitable for programmatic parsing.

  `-R`

    Recursively lists the contents of a group.

`changemgr add` [`-u` username] [`-p` file] [`-d` domain] `hostname` `hostpath`

  Register a network host name as a Sun Management Center host name. The host path includes the host group and the host name. The name of the managed host can be different from the network host name.

`changemgr add` [`-u` username] [`-p` file] [`-d` domain] `hostname`... `grouppath`

  Add the specified managed hosts to the specified host group, with the managed host names equal to the network host names.

`changemgr remove` [`-u` username] [`-p` file] [`-d` domain] `topopath`...

  Remove managed hosts and host groups from the topology.

`changemgr hostset` [`-u` username] [`-p` file] [`-d` domain] [`-s` name=value]... [`-s` name]... `topopath`...

  Set properties for the specified managed hosts and host groups by using the `-s` name=value option. The `-s` option with just the property name deletes the property.

  `-s` name=value

    Specifies one or more name`=`value pairs. name is the property name, and value is the property value. Supply the `-s` 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 the `-s` option for each property you want to delete.

`changemgr hostmove` [`-u` username] [`-p` file] [`-d` domain] `old_topopath`... `new_grouppath`

  Move managed hosts or host groups to another host group. The destination host group must already exist.

`changemgr hostmove` [`-u` username] [`-p` file] [`-d` domain] `old_topopath` `new_topopath`

  Rename a single managed host or host group.

#### Host Operations

`changemgr update` [`-u` username] [`-p` file] [`-d` domain] [`-x` operation] `topopath`...

  Update the specified managed hosts to conform to the configuration specified by their properties.

  If `topopath` is a host group, all members of the host group are updated.

  `-x` operation

    Specifies the action to take after the update completes. If operation is `reboot`, then activate the newly installed software stack and reboot. If operation is `halt`, then activate the newly installed software stack and halt. The default operation is to reboot the managed host.

`changemgr fallback` [`-u` username] [`-p` file] [`-d` domain] [`-x` operation] `topopath`...

  Restore the specified managed hosts to their state prior to the last `changemgr update` operation. This action only undoes the last update operation. This action does not change the parameters associated with the managed host. After the fallback operation, the managed host's running configuration will not match the parameters selected for it, which is the case immediately prior the update operation.

  If `topopath` is a host group, all members of the host group are restored.

  `-x` operation

    Specifies the action to take after the fallback completes. If operation is `reboot`, then activate the newly selected software stack and reboot. If operation is `halt`, then activate the newly selected software stack and halt. The default operation is to reboot the managed host.

`changemgr reinstall` [`-u` username] [`-p` file] [`-d` domain] `topopath`...

  Reinstall the specified managed hosts. The reinstallation is equivalent to this:

      # reboot -- net - install

  If `topopath` is a host group, all members of the host group are reinstalled.

`changemgr setup` [`-u` username] [`-p` file] [`-d` domain] `topopath`...

  Set up files for initial installation. This operation is required before manually running `boot net `-` install` on the consoles of managed hosts.

  If `topopath` is a host group, all files for the members of the host group are set up.

`changemgr reboot` [`-u` username] [`-p` file] [`-d` domain] `topopath`...

  Reboot the specified managed hosts.

  If `topopath` is a host group, all members of the host group are rebooted.

`changemgr halt` [`-u` username] [`-p` file] [`-d` domain] `topopath`...

  Halt the specified managed hosts.

  If `topopath` is a host group, all members of the host group are halted.

`changemgr manifest` [`-u` username] [`-p` file] [`-d` domain] `-o` `relpathprefix` [`-r` `relfilepath.brul`] `topopath`...

  Create manifests for the specified managed hosts.

  `-o` relpathprefix

    Specifies the prefix to use when creating manifests. The host name and suffix are appended to the prefix to form the name of the manifest.

  `-r` `relfilepath.brul`

    Specifies the audit rules file to use when building manifests.

`changemgr audit` [`-u` username] [`-p` file] [`-d` domain] `-o` `relfilepath.txt` [`-r` `relfilepath.brul`] `relfilepath.bmft` `topopath`...

  Compare managed host contents against a baseline manifest.

  `-o` `relfilepath.txt`

    Specifies the file path of the report.

  `-r` `relfilepath.brul`

    Specifies the audit rules file to use when auditing hosts.

`changemgr info` [`-u` username] [`-p` file] [`-d` domain] `-o` `relfilepath.txt` `topopath`...

  Get software status information about the specified managed hosts. Store the results in the specified report.

  `-o` `relfilepath.txt`

    Specifies the file path of the report.

#### Job Management Operations

`changemgr jobs` [`-u` username] [`-p` file] [`-l`] [`-o` format] [id...]

  Display the status of all outstanding jobs or of specified jobs.

  `-l`

    Presents more information in tabular output. This output is not suitable for programmatic parsing.

`changemgr kill` [`-u` username] [`-p` file] id...

  Cancel currently running jobs or pending jobs.

`changemgr ack` [`-u` username] [`-p` file] id...

  Acknowledge the completion of the specified jobs. This action discards the status of the specified jobs.

  Use this command to purge completed job entries from the job list that were initiated by the browser interface.

#### Miscellaneous

`changemgr help`

  Provide a one-line summary of the available subcommands. No authentication is required.

`changemgr help` subcommand

  Provide a summary of the specified subcommand. No authentication is required.

#### SEE ALSO

csh(1), date(1), ksh(1), sh(1), id(1M)

#### EXAMPLES

##### Example 1 Running Commands in an Interactive Change Manager Session

The following example shows an interactive Change Manager session. The `changemgr session` command starts a subshell in which you can run authenticated `changemgr` commands.

This example shows how to purge a completed job from the job queue. This job, `IC_1`, was initiated from the browser interface. When the tasks are completed, exit the session by typing `exit` at the subshell prompt.

    $ changemgr session
    Password: password
    $ changemgr jobs -l IC_1
    IC_1     succeeded
    $ changemgr ack IC_1
    $ changemgr jobs l IC_1
    $ exit

##### Example 2 Running Scripts in a Change Manager Session

This example shows how to use the `changemgr session` command to run a script.

The following command line runs the `deploy-web` script.

    $ changemgr session deploy-web web.flar host1

The `deploy-web` script contains the following:

    $ cat deploy-web
    #/bin/sh
    changemgr import "$1" /
    changemgr fileset -s MediaName=s9.miniroot "$1"
    changemgr hostset -s base_config_flar_archive="/$1" "$2"
    changemgr update "$2"
    $

SunOS 5.9 Last Revised 18 February 2003

NAME | SYNOPSIS | DESCRIPTION | OPTIONS | OPERANDS | SUBCOMMANDS | SEE ALSO | EXAMPLES

## cmgetprop(1MCM)

NAME | SYNOPSIS | DESCRIPTION | EXAMPLES | SEE ALSO

#### NAME

cmgetprop– Get Change Manager property value

#### SYNOPSIS

`cmgetprop` property-name

#### DESCRIPTION

The cmgetprop(1MCM) command writes the value of the specified property to standard output. Note that no value is returned when the property is not set.

Use the `cmgetprop` command in deployment finish scripts to get property values. Change Manager finish scripts are stored in the `/etc/ichange.d` directory.

The `cmgetprop` command is included in the `$PATH` supplied to the Change Manager finish scripts.

#### EXAMPLES

##### Example 1 Using the `cmgetprop` Command

The following line might exist in a Change Manager finish script.

    FILENAME=`cmgetprop FNAME`

This code assigns the value of the `FNAME` property to the `FILENAME` variable.

#### SEE ALSO

Sun Management Center Change Manager 1.0.1 Administration Guide

SunOS 5.9 Last Revised 10 October 2002

NAME | SYNOPSIS | DESCRIPTION | EXAMPLES | SEE ALSO

## flar(1MCM)

NAME | SYNOPSIS | DESCRIPTION | SUBCOMMANDS | OPTIONS | EXAMPLES | OPERANDS | EXIT STATUS | ATTRIBUTES | SEE ALSO

#### NAME

flar– administer flash archives

#### SYNOPSIS

`flar` create `-n` name [`-R` root] [`-H`] [`-I`] [`-S`] [`-c`] [`-t`[`-p` posn][`-b` blocksize]] [`-i` date] [`-u` section…] [`-U` key=value…] [`-m` master] [`-f` [filelist | -][`-F`]] [`-a` author] [`-e` descr | `-E` descr_file] [`-T` type] [`-x` exclude…] [`-y` include…] [`-z` filelist…] [`-X` filelist…] archive
`flar` combine [`-d` dir] [`-u` section…] [`-t`[`-p` posn][`-b` blocksize]] archive
`flar` split [`-d` dir] [`-u` section…] [`-f`] [`-S` section] [`-t`[`-p` posn][`-b` blocksize]] archive
`flar` info [`-l`] [`-k` keyword] [`-t`[`-p` posn][`-b` blocksize]] archive

#### DESCRIPTION

The `flar` command is used to administer flash archives. A flash archive is an easily transportable version of a reference configuration of the Solaris operating environment, plus other optional software. Such an archive is used for the rapid installation of the Solaris software on large numbers of machines. You can create a flash archive using either `flar` with the `create` subcommand or the flarcreate(1MCM) command. See flash_archive(4CM).

In flash terminology, a system on which an archive is created is called a master. The system image stored in the archive is deployed to systems that are called clones.

An archive is created with the `create` subcommand. It contains all the files that are in a system image.

You can run `flar create` in multiuser or single-user mode. You can also use the command when the master system is booted from the first Solaris software CD or from a Solaris net image. Archive creation should be performed when the master system is in as stable a state as possible.

Following the creation of a flash archive, you can use custom JumpStart to clone the archive on multiple systems.

#### SUBCOMMANDS

The `flar` command includes subcommands for creating, combining, splitting, and providing information about archives. A subcommand is the first argument in a `flar` command line. The subcommands are as follows:

`create`

  Create a new flash archive, of a name you specify with the `-n` argument, based on the currently running system.

  The `create` subcommand requires superuser privileges.

`combine`

  Combine the individual sections that make up an archive into the archive. If dir is specified (see `-d` option), the sections will be gathered from dir. Otherwise, they will be gathered from the current directory. Each section is assumed to be in a separate file, the names of which are the section names. At a minimum, the archive cookie (`cookie`), archive identification (`identification`), and archive files (`archive`) sections must be present. If `archive` is a directory, its contents are archived using `cpio` prior to inclusion in the archive. If so specified in the `identification` section, the contents are compressed.

  Note that no validation is performed on any of the sections. In particular, no fields in the `identification` section are validated or updated. See flash_archive(4CM) for a description of the archive sections.

``info``

  Extract information on an archive. This subcommand is analogous to `pkginfo`.

`split`

  Split an archive into one file for each section of the archive. Each section is copied into a separate file in dir, if dir is specified (see `-d` option), or the current directory if it is not. The files resulting from the split are named after the sections. The archive cookie is stored in a file named `cookie`. If section is specified (see `-u` option), only the named section is copied.

The options for each subcommand are described in OPTIONS.

#### OPTIONS

The `create` subcommand has one required option:

`-n` name

  Is the value of the `content_name` keyword. See flash_archive(4CM).

Following are the options for the `create` subcommand. Many of these options supply values for keywords in the identification section of a file containing a flash archive. See flash_archive(4CM) for a description of these keywords.

`-a` author

  Provides an author name for the archive identification section of the new flash archive. If you do not specify `-a`, no author name is included in the identification section.

`-c`

  Compresses the archive using compress(1).

`-e` descr

  Is the description to be included in the archive as the value of the `content_description` archive identification key. This option is incompatible with `-E`.

`-E` descr_file

  Is the description to be used as the value of the archive identification `content_description` key as retrieved from the file descr_file. This option is incompatible with `-e`.

`-f` filelist

  Uses the contents of filelist as a list of files to include in the archive. The files are included in addition to the usual file list, unless `-F` is specified (see the `-F` option). If filelist is `-`, the list is taken from standard input.

`-F`

  Includes only files in the list specified by `-f`. This option makes `-f` filelist an absolute list, rather than a list that is appended to the usual file list.

`-H`

  Does not generate a hash identifier.

`-i` date

  By default, the value for the `creation_date` field in the identification section is generated automatically, based on the current system time and date. If you specify the `-i` option, date is used instead.

`-I`

  Ignores integrity check. To prevent you from excluding important system files from an archive, `flar` runs an integrity check. This check examines all files registered in a system package database and stops archive creation if any of them are excluded. Use this option to override this integrity check.

`-m` master

  By default, the value for the `creation_master` field in the identification section is the name of the system on which you run `flar create`, as reported by `uname` `-n`. If you specify `-m`, master is used instead.

`-R` root

  Creates the archive from the file system tree mounted at root. If you do not specify this option, `flar` creates an archive from a file system mounted at `/`.

`-S`

  Skips the disk space check. Without `-S`, `flar` builds a compressed archive in memory before writing the archive to disk, to ensure you have sufficient disk space. Use `-S` to skip this step. The result of the use of `-S` is a significant decrease in the time it takes to create an archive.

`-T` type

  Is the content type included in the archive as the value of the `content_type` archive identification key. If you do not specify `-T`, the `content_type` keyword is not included.

`-u` section ...

  Include the user-defined section located in the file section in the archive. section must be a blank-separated list of section names as described in the flash_archive(4CM) man page.

`-U` key=value...

  Includes one or more user-defined keywords and their values in the archive identification section. See flash_archive(4CM).

`-x` exclude ...

  Excludes the file or directory exclude from the archive. Note that the exclude file or directory is assumed to be relative to the alternate root specified using `-R`. If the parent directory of the file exclude is included with the `-y` option (see `-y` include), then only the specific file or directory specified by exclude is excluded. Conversely, if the parent directory of an included file is specified for exclusion, then only the file include is included. For example, if you specify:

  `-x` `/a` `-y` `/a/b`

  all of `/a` except for `/a/b` is excluded. If you specify:

  `-y` `/a` `-x` `/a/b`

  all of `/a` except for `/a/b` is included.

`-X` filelist ...

  Uses the contents of filelist as a list of files to exclude from the archive. If filelist is `–`, the list is taken from standard input.

`-y` include ...

  Includes the file or directory include in the archive. Note that the exclude file or directory is assumed to be relative to the alternate root specified using `-R`. See the description of the `-x` option for a description of the interaction of the `-x` and `-y` options.

`-z` filelist ...

  Is a list of files prefixed with a plus (`+`) or minus (`-`). A plus indicates that a file should be included in the archive. The minus indicates exclusion. If filelist is `–`, the list is taken from standard input.

The options for the `info` subcommand are as follows:

`-k` keyword

  Returns only the value of the keyword keyword.

`-l`

  Lists all files in the archive. Does not process content from any sections other than the `archive` section.

Following are the `info` options to use with tape archives:

`-b` blocksize

  Is the block size to use when creating the archive. If not specified, a default block size of 64K is used.

`-p` posn

  Specifies the position on the tape device where the archive should be created. If not specified, the current position of the tape device is examined.

`-t`

  Indicates that the archive to be analyzed is located on a tape device. The path to the device is specified by archive (see OPERANDS).

The options for the `split` and `combine` (split and combine archives) subcommands are as follows:

`-d` dir

  Retrieves sections from dir, rather than from the current directory.

`-f`

  (Used with `split` only.) Extracts the `archive` section into a directory called `archive`, rather than placing it in a file of the same name as the section.

`-S` section

  (Used with `split` only.) Extracts only the section named section from the archive.

`-u` section...

  Appends section to the list of sections to be included. The default list includes the `cookie`, `identification`, and `archive` sections. section can be a single section name or a space-separated list of section names.

The following options are used with tape archives (with both `split` and `combine`):

`-b` blocksize

  Is the block size to be used when creating the archive. If not specified, a default block size of 64K is used.

`-p` posn

  Used only with `-t`. Specifies the position on the tape device where the archive should be created. If not specified, the current position of the tape device is used.

`-t`

  Creates an archive on or reads an archive from a tape device. The archive operand (see OPERANDS) is assumed to be the name of the tape device.

#### EXAMPLES

##### Example 1 Creating a Flash Archive

The following command creates a flash archive named `pogoS9` and stores it in `/export/home/archives/s9fcs.flar`. The currently running system is the basis for the new archive.

    # flar create -n pogoS9 /export/home/archives/s9fcs.flar

#### OPERANDS

The following operand is supported:

archive

  Path to tape device if the `-t` option was used. Otherwise, the complete path name of a flash archive. A file containing a flash archive has a standard file extension of `.flar`.

#### EXIT STATUS

The following exit values are returned for the `create`, `split`, and `combine` subcommands:

`0`

  Successful completion.

`0`

  An error occurred.

The following exit values are returned for the `info` subcommand:

`0`

  Successful completion.

`1`

  Command failed. If the `-k` option is used and the requested keyword is not found, `flar` returns `2`.

#### ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE | ATTRIBUTE VALUE
--- | ---
Availability | SUNWinst

#### SEE ALSO

compress(1), flarcreate(1MCM), flash_archive(4CM), attributes(5)

SunOS 5.9 Last Revised 30 April 2003

NAME | SYNOPSIS | DESCRIPTION | SUBCOMMANDS | OPTIONS | EXAMPLES | OPERANDS | EXIT STATUS | ATTRIBUTES | SEE ALSO

## flarcreate(1MCM)

NAME | SYNOPSIS | DESCRIPTION | OPTIONS | OPERANDS | EXIT STATUS | ATTRIBUTES | SEE ALSO

#### NAME

flarcreate– create a flash archive from a master system

#### SYNOPSIS

`flarcreate` `-n` name [`-R` root] [`-H`] [`-I`] [`-S`] [`-c`] [`-t`[`-p` posn][`-b` blocksize]] [`-i` date] [`-u` section…] [`-U` key=value…] [`-m` master] [`-f` [filelist | -][`-F`]] [`-a` author] [`-e` descr | `-E` descr_file] [`-T` type] [`-x` exclude…] [`-y` include…] [`-z` filelist…] [`-X` filelist…] archive

#### DESCRIPTION

The `flarcreate` command creates a flash archive from a master system. A master system is one that contains a reference configuration, which is a particular configuration of the Solaris operating environment, plus other optional software. A flash archive is an easily transportable version of the reference configuration.

In flash terminology, a system on which an archive is created is called a master. The system image stored in the archive is deployed to systems that are called clones.

An archive contains all the files that are in a system image.

Following the creation of a flash archive, you can use custom JumpStart to clone the archive on multiple systems.

You can run `flarcreate` in multiuser or single-user mode. You can also use the command when the master system is booted from the first Solaris software CD or from a Solaris net image.

Archive creation should be performed when the master system is in as stable a state as possible. Following archive creation, use the flar(1MCM) command to administer a flash archive.

See flash_archive(4CM) for a description of the flash archive.

The `flarcreate` command requires superuser privileges.

#### OPTIONS

The `flarcreate` command has one required option:

`-n` name

  Specifies the name of the flash archive. name is supplied as the value of the `content_name` keyword. See flash_archive(4CM).

The `flarcreate` command has the following general options:

`-c`

  Compresses the archive using compress(1).

`-f` filelist

  Uses the contents of filelist as a list of files to include in the archive. The files are included in addition to the usual file list, unless `-F` is specified (see the `-F` option). If filelist is `-`, the list is taken from standard input.

`-F`

  Includes only files in the list specified by `-f`. This option makes `-f` filelist an absolute list, rather than a list that is appended to the usual file list.

`-H`

  Does not generate a hash identifier.

`-I`

  Ignores integrity check. To prevent you from excluding important system files from an archive, `flarcreate` runs an integrity check. This check examines all files registered in a system package database and stops archive creation if any of them are excluded. Use this option to override this integrity check.

`-R` root

  Creates the archive from the file system tree mounted at root. If you do not specify this option, `flarcreate` creates an archive from a file system mounted at `/`.

`-S`

  Skips the disk space check. Without `-S`, `flarcreate` builds a compressed archive in memory before writing the archive to disk, to ensure you have sufficient disk space. Use `-S` to skip this step. The result of the use of `-S` is a significant decrease in the time it takes to create an archive.

`-U` key=value...

  Includes one or more user-defined keywords and their values in the archive identification section. See flash_archive(4CM).

`-x` exclude...

  Excludes the file or directory exclude from the archive. Note that the exclude file or directory is assumed to be relative to the alternate root specified using `-R`. If the parent directory of the file exclude is included with the `-y` option (see `-y` include), then only the specific file or directory specified by exclude is excluded. Conversely, if the parent directory of an included file is specified for exclusion, then only the file include is included. For example, if you specify:

  `-x` `/a` `-y` `/a/b`

  all of `/a` except for `/a/b` is excluded. If you specify:

  `-y` `/a` `-x` `/a/b`

  all of `/a` except for `/a/b` is included.

`-X` filelist...

  Uses the contents of filelist as a list of files to exclude from the archive. If filelist is `–`, the list is taken from standard input.

`-y` include...

  Includes the file or directory include in the archive. Note that the exclude file or directory is assumed to be relative to the alternate root specified using `-R`. See the description of the `-x` option for a description of the interaction of the `-x` and `-y` options.

`-z` filelist...

  Is a list of files prefixed with a plus (`+`) or minus (`-`). A plus indicates that a file should be included in the archive. The minus indicates exclusion. If filelist is `–`, the list is taken from standard input.

Use the following options with user-defined sections:

`-d` dir

  Retrieves the section file specified with `-u` from dir.

`-u` section...

  Includes the user-defined section located in the file section in the archive. section must be a blank-separated list of section names as described in flash_archive(4CM).

Use the following options with tape archives:

`-b` blocksize

  Is the block size to be used when creating the archive. If not specified, a default block size of 64K is used.

`-p` posn

  Used only with `-t`. Specifies the position on the tape device where the archive should be created. If not specified, the current position of the tape device is used.

`-t`

  Creates an archive on a tape device. The archive operand (see OPERANDS) is assumed to be the name of the tape device.

The following options are used for archive identification:

`-a` author

  Provides an author name for the archive identification section. If you do not specify `-a`, no author name is included in the identification section.

`-e` descr

  Is the description to be included in the archive as the value of the `content_description` archive identification key. This option is incompatible with `-E`.

`-E` descr_file

  Is the description to be used as the value of the archive identification `content_description` key as retrieved from the file descr_file. This option is incompatible with `-e`.

`-i` date

  By default, the value for the `creation_date` field in the identification section is generated automatically, based on the current system time and date. If you specify the `-i` option, date is used instead.

`-m` master

  By default, the value for the `creation_master` field in the identification section is the name of the system on which you run `flarcreate`, as reported by `uname` `-n`. If you specify `-m`, master is used instead.

`-T` type

  Is the content type included in the archive as the value of the `content_type` archive identification key. If you do not specify `-T`, the `content_type` keyword is not included.

#### OPERANDS

The following operand is supported:

archive

  Path to tape device if the `-t` option was used. Otherwise, the complete path name of a flash archive. A file containing a flash archive has a standard file extension of `.flar`.

#### EXIT STATUS

The following exit values are returned:

`0`

  Successful completion.

`0`

  An error occurred.

#### ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE | ATTRIBUTE VALUE
--- | ---
Availability | SUNWinst

#### SEE ALSO

compress(1), flar(1MCM), flash_archive(4CM), attributes(5)

SunOS 5.9 Last Revised 30 April 2003

NAME | SYNOPSIS | DESCRIPTION | OPTIONS | OPERANDS | EXIT STATUS | ATTRIBUTES | SEE ALSO

- Previous: Sun Management Center Change Manager 1.0.1 Reference Manual
- Next: Change Manager File Formats

- © 2010, Oracle Corporation and/or its affiliates