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 |
|
Display help text for |
|
Check the consistency of a database. For details, see Consistency checker. |
|
|
Collect the most common information needed for remote assessments. For details, see Neo4j Admin report. |
|
|
Print information about a Neo4j database store. For details, see Display store information. |
|
|
Print Neo4j heap and pagecache memory settings recommendations. For details, see Memory recommendations. |
|
|
Import from a collection of CSV files or a pre-3.0 database. For details, see Import. |
|
|
Copy data from an existing database to a new database. For details, see Copy a database store. |
|
|
Dumps a local database, and imports into a specified Neo4j AuraDB instance. For details, see Push to Neo4j AuraDB. |
|
Authentication |
|
Sets the default admin user when no roles are present. |
|
Sets the initial password of the initial admin user ( For details, see Set an initial password. |
|
Offline backup For details see Back up an offline database and Restore a database dump. |
|
Dump a database into a single-file archive. |
|
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. |
|
Perform an online backup from a running Neo4j server. |
|
Restore a backed-up database. |
|
Clustering |
|
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.