Repository

Contents

Repository

Repository

Commands for configuring and managing repositories. Full list is available by typing:

$ enonic repo

Tune and manage repositories

USAGE:
   Enonic CLI repo command [command options] [arguments...]

COMMANDS:
     reindex   Reindex content in search indices for the given repository and branches.
     readonly  Toggle read-only mode for server or single repository
     replicas  Set the number of replicas in the cluster.
     list, ls  List available repos

OPTIONS:
   --help, -h  show help

Reindex

Reindex the content in the search indices for the given repository and branches. This is usually required after upgrades, and may be useful in many other situation.

$ enonic repo reindex [--b <value, value...>] [-r <value>] [-i] [-a <value>]

Options:

Option Description

-b

a comma-separated list of branches to be reindexed

-r

the name of the repository to reindex

-i

if true, the indices will be deleted before recreated

--a, --auth

authentication token for basic authentication (user:password)

if auth param is missing and there is no valid session CLI will look for ENONIC_CLI_REMOTE_USER and ENONIC_CLI_REMOTE_PASS environment variables. See configuration section.
Example reindexing content in branches 'draft' and 'master' of 'cms-repo' repository:
$ enonic repo reindex -a su:password -b draft,master -i -r cms-repo

Readonly

Toggle read-only mode. In read-only mode, no changes can be made on the server, or a single repo if specified

$ enonic repo readonly [readOnly] [-r <value>] [-a <value>]

Options:

Option Description

readOnly

boolean value to set

-r

single repository to toggle read-only mode for

--a, --auth

authentication token for basic authentication (user:password)

if auth param is missing and there is no valid session CLI will look for ENONIC_CLI_REMOTE_USER and ENONIC_CLI_REMOTE_PASS environment variables. See configuration section.
Example setting 'cms-repo' repository to read-only mode:
$ enonic repo readonly true -a su:password -r cms-repo

Replicas

Set the number of replicas in the cluster. For more information on how replicas work and recommended values, see: Replica setup.

$ enonic repo replicas [replicasNum] [-a <value>]

Options:

Option Description

replicasNum

whole number between 1 and 99 to set

--a, --auth

authentication token for basic authentication (user:password)

if auth param is missing and there is no valid session CLI will look for ENONIC_CLI_REMOTE_USER and ENONIC_CLI_REMOTE_PASS environment variables. See configuration section.
Example setting number of replicas to 3:
$ enonic repo replicas 3 -a su:password

List

List available repositories.

$ enonic repo list [-a <value>]

Options:

Option Description

--a, --auth

authentication token for basic authentication (user:password)

if auth param is missing and there is no valid session CLI will look for ENONIC_CLI_REMOTE_USER and ENONIC_CLI_REMOTE_PASS environment variables. See configuration section.
Example listing repositories:
$ enonic repo list -a su:password

Contents