Event Broker File Management

All event broker files that may need to be added or removed from the Solace PubSub+ event broker exist under the root “/” directory. You can use the Solace CLI to perform administrative tasks in the root directory.

The relevant root directory structure is shown below, along with the names of applicable subdirectories and a brief description of what files they contain. All other subdirectories in the root directory are not currently in use.

Root Directory Structure

Illustration depicting the concepts described in the surrounding text.

The debug log record files contained in the directory /logs are for use by Solace support staff only.

Changing Directories

To change the present working directory, enter the following User EXEC command:

solace> cd [<directory>]

Where:

directory is the directory to change to. If no directory is specified, the root directory is assumed.

Copying Files

You can use the copy Privileged EXEC command to:

  • copy the current configuration locally within the event broker
  • backup a configuration database file to a SFTP or SCP server from the
    /configs subdirectory on an event broker
  • restore a configuration database file from a SFTP or SCP server to the
    /configs subdirectory on an event broker
  • download new Solace PubSub+ software from a SFTP or SCP server to the /loads subdirectory on an event broker for software upgrade

Refer to Backing Up and Restoring Event Broker Configurations for more information on the copy Privileged EXEC command and its use.

To copy configuration files to and from the event broker, enter the following Privileged EXEC command:

solace# copy <source> <destination>

Where:

<source> is a string indicating the source file to copy. Valid formats and syntax are described below.

<destination> is the location in the event broker root directory to put the configuration copy. Valid formats and syntax are listed below.

Valid File Name Formats for copy Privileged EXEC Command

Format Syntax Description

current-config

current-config

The current persistent-state of the event broker.

SFTP

sftp://[<username>@]<ip-addr>/<remote-pathname>

A remotely available file accessible through the SFTP protocol. In a copy operation only one of either <source> or <destination> may be specified as an SFTP file, but not both.

SCP

scp://[<username>@]<ip-addr>/<remote-pathname>

A remotely available file accessible through the SCP protocol. In a copy operation only one of either <source> or <destination> may be specified as an SCP file, but not both.

pathname

[/][directory/]/ filename

Absolute or relative name of a regular file stored in the root directory. Internally, an absolute name is always relative to the root directory, while relative names are always evaluated relative to the present working directory (displayable through the pwd User EXEC command).

Deleting Files

To delete a file from the event broker, enter the following Privileged EXEC command:

solace# delete <file>

Where:

<file> is the name of the local file to delete which may include a pathname. Only <local-pathname> formats may be used. ‘*’ and ‘?’ characters can be used to match multiple files.

Displaying Text File Contents

To display the contents of a text file in a directory, enter the following User EXEC command:

solace> more <pattern>

Where:

<pattern> is the name of the text file to display. ‘*’ and ‘?’ characters can be used to match multiple text files. If not specified, all the text files in the present working directory are displayed.

Binary files cannot be displayed.

Displaying the Present Working Directory

To display the present working directory (pwd), enter the following User EXEC command:

solace> pwd

Listing Directory Contents

To list the contents of a directory, enter the following User EXEC command:

solace> dir [<pattern>] 

Where:

<pattern> is the name of the file or directory to display. ‘*’ and ‘?’ characters can be used to match multiple files. If not specified, all the files in the present working directory are displayed.

Renaming Files

To rename an event broker file within one of the event broker's root subdirectories, enter the following Privileged EXEC command:

solace# rename <old> <new>

Where:

<old> is the current name of the pathname file to be renamed. Only <local-pathname> formats may be used.

<new> is the new name for the pathname file specified by <old>. Only <local-pathname> formats may be used.