faunadb-admin reference

faunadb-admin is the administration tool that helps you to manage your FaunaDB cluster. It provides the functionality for checking the status of your cluster, adding or removing nodes, performing repair activities, and more. This section provides a reference for everything that faunadb-admin can do.

Command reference

Information
config

Shows FaunaDB configuration.

host-build

Shows build information.

host-id

Shows the host ID of the provided host.

host-info

Shows system information.

host-version

Shows FaunaDB version information.

mapper-status

Shows the status of mappers.

movement-status

Shows status of data movements in cluster.

show-identity

Shows the host’s UUID.

show-replication

Displays replication configuration.

status

Shows the cluster status.

Miscellaneous
reseed-samples

Re-seeds sample data for health checks.

steal-tasks

Steals pending tasks from removed nodes.

update-replica

Sets the type of one or more named replicas.

Repairs
repair

Run data repair.

cancel-repair

Cancel data repair.

repair-status

Current repair status.

Security
hash-key

Generates a hash of a specified key.

security-check

Sanity checks the security of the FaunaDB server files.

security-repair

Repairs security issues with the FaunaDB server files.

Snapshots
create-snapshot

Creates a snapshot with a specified name.

load-snapshot

Loads an existing snapshot from a specified path.

show-snapshots

Shows available snapshots.

Storage engine
show-storage-version

Displays the local node’s storage version.

update-storage-version

Applies any pending updates to the cluster’s storage layer.

Topology
init

Initializes the first node in a cluster.

join

Joins a node to the cluster via an active node.

rejoin

Rejoins a node to the cluster after an IP address change.

remove

Removes a node from the cluster.

Environment

The following environment variables can be used to make it easier to run faunadb-admin with a specific configuration file, root key, or host to connect to.

Environment variable Description

FAUNADB_CONFIG

The path to the FaunaDB configuration file.

FAUNDB_ROOT_KEY

The root key for the FaunaDB cluster.

FAUNADB_HOST

The host, IP address or hostname, to connect to.

Run

faunadb-admin is included in Docker and binary package installations of FaunaDB, typically at /usr/local/bin/faunadb-admin.

Log into the node in your cluster that you wish to administer. For the Docker image, run:

docker exec -it <image name> /bin/bash
root@19415823290b:/faunadb#
For topology-manipulating commands, it does not matter which node runs faunadb-admin. You can check the status of the cluster, or make topology changes, from any node. However, FaunaDB has to be running on the node, and the node has to be joined to the cluster, for this to be true.

Verify that faunadb-admin is in your path:

faunadb-admin --help
usage: faunadb-admin COMMAND [args]
 -b,--bind-address <arg>   IP address to bind to. (default: 127.0.0.1)
 -c,--conf <arg>           Path to configuration file.
 -h,--help                 Print this message.
 -H,--host <arg>           FaunaDB host to connect to.
 -k,--key <arg>            FaunaDB root key to authenticate with.
 -n,--dry-run              When used with 'repair', do not modify index
                           data, only log what would happen.
 -p,--port <arg>           Port to listen on. (default: 8443)
 -r,--replica <arg>        The replica that this node should join by
                           default.

COMMANDS:
status                                                Show cluster status.
config [values|basic]                                 Show FaunaDB configuration.
movement-status                                       Show status of data movements in cluster.
show-identity                                         Show host ID.
host-id HOST                                          Show the host ID of the provided HOST.
host-version                                          Show FaunaDB version information.
host-info                                             Show system information.
init                                                  Initialize the first node in a cluster
join HOST                                             Join a cluster through an active node specified in HOST.
rejoin HOST                                           Notify the cluster that the node moved to a different address and is rejoining from there, through an active node specified in HOST.
remove HOST_ID                                        Remove a node identified by HOST_ID from the cluster. Removes which are not safe, such as those resulting in data loss, will return an error.
show-replication                                      Display replication configuration.
update-replica {compute|data|data+log} DC[ DC[ ...]]  Set type of one or more named replicas.
show-storage-version                                  Display this node's storage version.
update-storage-version                                Apply any pending updates to the cluster's storage layer.
repair                                                Run data repair.
cancel-repair                                         Cancel data repair.
repair-status                                         Current repair status.
create-snapshot NAME                                  Creates a snapshot with name NAME.
load-snapshot PATH                                    Loads an existing snapshot from PATH.
show-snapshots                                        Shows available snapshots.
hash-key KEY                                          Generates a hash of KEY.
reseed-samples                                        Re-seeds sample data for health checks.
security-check                                        Sanity check the security of the FaunaDB server files.
security-repair                                       Repair security issues with the FaunaDB server files.
steal-tasks                                           Steal pending tasks from removed nodes.
mapper-status                                         Show mappers status.

ENVIRONMENT:
FAUNADB_CONFIG    Path to FaunaDB config file.
FAUNADB_ROOT_KEY  FaunaDB cluster root key.
FAUNADB_HOST      Host to connect to.

Options

Use the following options to override specific configuration settings.

Option Description

-b, --bind-address <arg>

The IP address to bind to. (default: 127.0.0.1)

-c, --conf <arg>

The path to the FaunaDB configuration file.

-h, --help

Show the help output.

-H, --host <arg>

The FaunaDB host, IP address or hostname, to connect to.

-k, --key <arg>

FaunaDB root key to authenticate with.

-n, --dry-run

When used with 'repair', do not modify index data, only log what would happen.

-p, --port <arg>

The port to listen on. (default: 8443)

-r, --replica <arg>

The replica that this node should join by default.

Was this article helpful?

We're sorry to hear that.
Tell us how we can improve! documentation@fauna.com

Thank you for your feedback!