CTL-ARCHIVE Command Reference

From ControlTier

Jump to: navigation, search

Contents

Synopsis

ctl-archive -a {create|extract} -f <> [-p <> | -d <>]

Since CTL 1.2

Overview

The ctl-archive command is used to create and extract archived object data. This command is useful when it is preferable to use a package-centric release methodology rather than distribute data via a pull-based centralized client/webserver. Using ctl-archive you can package object resource.properties data maintained in an SCM and deploy it to CTL hosts using a package distribution tool like RPM.

Object data is structured in the normal CTL project name structure. Archives contain these two kinds of files: resource.properties for any object and the resources.properties that shows the mapping of objects to nodes:

See ProjectBuilder's archive-resources command to create an archive from data stored in Workbench.

Directory structure

For users maintaining these files in an SCM, employ the following directory structure to faciliate easy ctl-archive use:

Object data : Entity info organized by type and name

{project}/resources/{type}/{name}/var/resource.{properties|xml|rdf}

resources.properties : Maps the resources to nodes

{project}/etc/resources.properties.

Example directory structure

demo
|-- resources
|   `-- Service
|       |-- mock
|       |-- mock1
|       |   `-- var
|       |       `-- resource.properties
|       |-- mock2
|       |   `-- var
|       |       `-- resource.properties
|       `-- simpleApache
|           `-- var
|               `-- resource.properties
`-- etc
    `-- resources.properties

Filtered extraction

The ctl-archive extract action only extracts resource.properties files for objects registered to hosts thost registrations in the resources.properties file. This ensures that extraneous object data is not present on any host.

Options

Option alternate argument description
-h --help false displays the usage information presented above
-a --action true archival action. (create or extract)
-d --dir true directory containing depot deployments data
-f --file true file to extract or write archived data
-p --project true project name name

Execution

Examples:

ctl-archive -a create -p myproject -f myproject-archive.jar

Create an archive for all the resources in the project name: "myproject"

ctl-archive -a extract -p myproject -f myproject-archive.jar

Extracts the object data from the archive into project name: "myproject"

ctl-archive -a create -d targetdir/myproject -f myproject-archive.jar

Create an archive for all the object data in the directory: "targetdir/myproject"

Troubleshooting

No files extracted

Condition:

Filtered extraction may have prevented any files to be extracted to the local CTL host.

Check:

Resolutions:

Personal tools
Namespaces
Variants
Actions
Navigation
Communication
Development
Toolbox
Print/export