Display store information

You can use the neo4j-admin database info command to print information about a Neo4j database store. The following information about the store format of a given database store can be retrieved:

  • The store format version.

  • When the store format version was introduced.

  • Whether the store format needs to be migrated to a newer version.

For more information on database store formats, see Store formats.

The neo4j-admin database info command is located in the bin directory.

Syntax

The neo4j-admin database info command should be invoked against an offline database store or a backup and has the following syntax:

neo4j-admin database info [-h] [--expand-commands] [--verbose]
                          [--additional-config=<file>]
                          [--format=text|json]
                          [--from-path=<path>] [<database>]

Parameters

Table 1. neo4j-admin database info parameters
Parameter Description Default

[<database>]

Name of the database to show info for. Can contain * and ? for globbing. Note that * and ? have special meaning in some shells and might need to be escaped or used with quotes.

*

Options

The neo4j-admin database info command has the following options:

Table 2. neo4j-admin database info options
Option Description Default

--additional-config=<file>[1]

Configuration file with additional configuration.

--expand-commands

Allow command expansion in config value evaluation.

--format=text|json

The format of the returned information.

text

--from-path=<path>

Path to databases directory.

-h, --help

Show this help message and exit.

--verbose

Enable verbose output.

1. See Neo4j Admin and Neo4j CLI → Configuration for details.

Examples

The following examples show how to use the neo4j-admin database info command to display information about a database and its store format. All examples assume that the Neo4j server is Enterprise Edition and that the database is offline.

Example 1. Invoke neo4j-admin database info against a database store
bin/neo4j-admin database info healthcare
Output
Database name:                healthcare
Database in use:              false
Store format version:         block-block-1.1
Store format introduced in:   5.14.0
Last committed transaction id:29
Store needs recovery:         false
Example 2. Invoke neo4j-admin database info against all databases
bin/neo4j-admin database info --from-path=../data/databases
Output
Database name:                healthcare
Database in use:              false
Store format version:         block-block-1.1
Store format introduced in:   5.14.0
Last committed transaction id:29
Store needs recovery:         false

Database name:                neo4j
Database in use:              false
Store format version:         block-block-1.1
Store format introduced in:   5.14.0
Last committed transaction id:27
Store needs recovery:         false

Database name:                system
Database in use:              false
Store format version:         record-aligned-1.1
Store format introduced in:   5.0.0
Last committed transaction id:213
Store needs recovery:         false

When the command is invoked against several databases, if some are online they will simply report as in use and exclude all other information.

Example 3. Invoke neo4j-admin database info against a database and output JSON

If you are parsing the results of this command, you may use the --format=json option to receive the output as JSON. All the same fields are included and all values are strings.

bin/neo4j-admin database info --from-path ../data/databases --format=json foo
Output
{"databaseName":"healthcare","inUse":"false","storeFormat":"block-block-1.1","storeFormatIntroduced":"5.14.0","storeFormatSuperseded":null,"lastCommittedTransaction":"29","recoveryRequired":"false"}