Table of Contents
Last updated: 2024-06-26

ShareAspace administration tool


The ShareAspace administration tool is a tool intended for a server administrator managing a ShareAspace installation.

In the initial release the tool supports management of all the ShareAspace collection settings.

Typical use cases:

  • Administrate the collection settings of an existing installation. e.g. changing the request rate limit.
  • Administrate the system paths of an existing installation. e.g. changing the file path to the storage and file vault folders.
  • Reading and filter the ShareAspace system logs.
  • When moving a system backup from one environment to another. e.g. When restoring a production backup on to a quality assurance environment.

Deployment


The ShareAspace administration tool is packaged and installed together with the ShareAspace service host using the Service host MSI (Host-1.8.0.xyz.msi). By default the tool can be found at C:\Program Files\Eurostep\ShareAspace\Host\sas.exe.

Command line interface (CLI)


The command line interface has a help system that provides full documentation on how to use the tool. Running the tool with the --help option will bring up the documentation. The help option can then be utilized for each command in the CLI.

PS C:\Program Files\Eurostep\ShareAspace\Host> .\sas.exe --help
Note
  • That before being able to read, update, or create settings the ShareAspace service host must be turned off.
  • That the ShareAspace Host must be turned off in order to use most of the tool functionality.
Tip
  • Filtering the ShareAspace system logs is possible to do while the ShareAspace host is still running.
  • By copying the log archive from a running ShareAspace instance it is possible to use the filtering tool on a separate installation.

Example use


Help

PS C:\Program Files\Eurostep\ShareAspace\Host> .\sas.exe --help
Description:
  SAs Administration tool.

Usage:
  sas [command] [options]

Options:
  --systemPath <systemPath>  Path to ShareAspace system folder
  --version                  Show version information
  -?, -h, --help             Show help and usage information
  --output <JSON|Table>      Set output format [default: Table]

Commands:
  create           Create setting
  read             Read setting.
  update           Update setting
  run <script.js>  Load and run a data maintenance script against a ShareAspace database.
  logs             Read and manage ShareAspace log files.
  system           Manage ShareAspace storage paths

PS C:\Program Files\Eurostep\ShareAspace\Host>

Read settings help

PS C:\Program Files\Eurostep\ShareAspace\Host> .\sas.exe read -h
Description:
  Read setting.

Usage:
  sas read [command] [options]

Options:
  --systemPath <systemPath>  Path to ShareAspace system folder
  -?, -h, --help             Show help and usage information
  --output <JSON|Table>      Set output format [default: Table]

Commands:
  trustedIdentityProvider     Setup a trust to an external identity provider in ShareAspace using OpenID Connect
  objectLogging               Log when a new instance is created or when an existing is updated or deleted
  novaEndpoint                ShareAspace API root address
  requestRatePolicy           The number of requests a user can make of the system in any given time span.
  licenseServerEndpoint       License server configuration
  taskUploadApiKey            DataExchange Tasks administration API key
  administrationApi           Used for installing internal DataExchange tasks
  snapshotApiKey              Used for creating and restoring ShareAspace snapshots
  licenseCommunicationApiKey  Used for managing the ShareAspace license
  authorizationApiKey         Used for managing ShareAspace internal user accounts
  timeZone                    Default time zone
  invite                      User invite email configuration
  personalAccessToken         Configures the from email address that will be used for emails related to personal access 
                              tokens notifications
  multiSoftTypeCreate         Multi SoftType create API configuration
  webApplicationRoot          Web application base address
  authorization               ShareAspace authorization token configuration
  pepper                      Password pepper
  messageThreadMigration      MessageThread object migration settings


PS C:\Program Files\Eurostep\ShareAspace\Host>

Read settings

PS C:\Program Files\Eurostep\ShareAspace\Host> .\sas.exe read requestRatePolicy
      RequestRatePolicy
┌────────────────────┬──────┐
│ SamplingWindowSize │ 5    │
│ RequestLimit       │ 2000 │
└────────────────────┴──────┘

Update settings help

PS C:\Program Files\Eurostep\ShareAspace\Host> .\sas.exe update requestRatePolicy -h
Description:
  The number of requests a user can make of the system in any given time span.

Usage:
  sas update requestRatePolicy [options]

Options:
  --samplingWindowSize <samplingWindowSize>  The sliding time window size [minutes]
  --requestLimit <requestLimit>              The maximum number of requests allowed during the time window
  --systemPath <systemPath>                  Path to ShareAspace system folder
  -?, -h, --help                             Show help and usage information
  --output <JSON|Table>                      Set output format [default: Table]


PS C:\Program Files\Eurostep\ShareAspace\Host>

Logs filter help

PS C:\Program Files\Eurostep\ShareAspace\Host> .\sas.exe logs filter --help
Description:
  Filter log entries.

Usage:
  sas logs filter [<term(s)>...] [options]

Arguments:
  <term(s)>  Search for log entries that contain certain word or phrases.

Options:
  --path <path>                                          Log file(s) source path.
  --correlationId <correlationId>                        Search for log entries that contain specified correlation ID.
  --level <All|Critical|Debug|Error|Info|Trace|Warning>  Filter by log level. [default: All]
  --start <start>                                        Get log entries that occured after a specified date and time.
  --end <end>                                            Get log entries that occured before a specified date and time.
  --outFile <outFile>                                    Send output to a file.
  --systemPath <systemPath>                              Path to ShareAspace system folder
  -?, -h, --help                                         Show help and usage information
  --output <JSON|Table>                                  Set output format [default: Table]


PS C:\Program Files\Eurostep\ShareAspace\Host>

Logs filter expression

Example, filtering out Critical log entries mentioning /collection that were logged after 2023-06-22T03:00:00Z.

PS C:\Program Files\Eurostep\ShareAspace\Host> .\sas.exe logs filter "/collection" --level Critical --start 2023-06-22T03:00:00Z

Migration/Maintenance script execution help

PS C:\Program Files\Eurostep\ShareAspace\Host> .\sas.exe run -h
Description:
  Load and run a data maintenance script against a ShareAspace database.

Usage:
  sas run <script.js> [options]

Arguments:
  <script.js>  Name of the script file.

Options:
  --spaceId <spaceId>                    ID of the target space.
  --workingDirectory <workingDirectory>  Working directory for the scripts.
  --whatIf                               Run the script without actually committing the changes.
  --watch                                Run the script every time it changes. Whatch will enable whatIf mode.
  --systemPath <systemPath>              Path to ShareAspace system folder
  -?, -h, --help                         Show help and usage information
  --output <JSON|Table>                  Set output format [default: Table]


PS C:\Program Files\Eurostep\ShareAspace\Host>

Manage system paths

PS C:\Program Files\Eurostep\ShareAspace\Host> .\sas.exe system -h
Description:
  Manage ShareAspace storage paths

Usage:
  sas system [command] [options]

Options:
  --systemPath <systemPath>  Path to ShareAspace system folder
  -?, -h, --help             Show help and usage information
  --output <JSON|Table>      Set output format [default: Table]

Commands:
  list-paths              List current configuration
  set-base                Set base storage paths
  set-collection          Set collection storage paths
  set-space <spaceId>     Set space storage paths
  change-path             Change storage or file vault path
  remove-space <spaceId>  Remove space from system

PS C:\Program Files\Eurostep\ShareAspace\Host>