Neo4j Admin

Introduction

Neo4j Admin is the primary tool for managing your Neo4j instance. It is a command-line tool that is installed as part of the product and can be executed with a number of commands. Some of the commands are described in more detail in separate sections.

Syntax and commands

Syntax

Neo4j Admin is located in the bin directory and is invoked as:

neo4j-admin <command>

Commands

Functionality area Command Description

General

help <command>

Display help text for <command>

check-consistency

Check the consistency of a database.

For details, see Consistency checker.

report

Collect the most common information needed for remote assessments.

For details, see Neo4j Admin report.

store-info

Print information about a Neo4j database store.

For details, see Display store information.

memrec

Print Neo4j heap and pagecache memory settings recommendations.

For details, see Memory recommendations.

import

Import from a collection of CSV files or a pre-3.0 database.

For details, see Import.

copy

Copy data from an existing database to a new database.

For details, see Copy a database store.

push-to-cloud

Dumps a local database, and imports into a specified Neo4j AuraDB instance.

For details, see Push to Neo4j AuraDB.

Authentication

set-default-admin

Sets the default admin user when no roles are present.

set-initial-password

Sets the initial password of the initial admin user (neo4j).

For details, see Set an initial password.

Offline backup

For details see Back up an offline database and Restore a database dump.

dump

Dump a database into a single-file archive.

load

Load a database from an archive created with the dump command.

Online backup

For details see Back up an online database and Backup and restore.

backup

Perform an online backup from a running Neo4j server.

restore

Restore a backed-up database.

Clustering

unbind

Removes cluster state data from a stopped Neo4j server.

For details, see Unbind a Core Server.

Limitations

neo4j-admin must be invoked as the neo4j user in order to ensure the appropriate file permissions.

Environment variables

Neo4j Admin can utilize the following environment variables:

NEO4J_DEBUG

Set to anything to enable debug output.

NEO4J_HOME

Neo4j home directory.

NEO4J_CONF

Path to directory which contains neo4j.conf.

HEAP_SIZE

Set JVM maximum heap size during command execution. Takes a number and a unit, for example 512m.

JAVA_OPTS

Additional JVM arguments.

Exit codes

If neo4j-admin finishes as expected it will return an exit code of 0. A non-zero exit code means something undesired happened during command execution. The non-zero exit code can contain further information about the error, such as the backup command’s exit codes.