Upload to Neo4j Aura

The neo4j-admin database upload command uploads a local Neo4j database dump into a Neo4j Aura instance.
The following table shows the compatibility between the dump version that you want to upload and the version of the Neo4j Aura instance.

Dump version Aura version

5.x

5.latest

4.4

4 and 5.latest

4.3

4 and 5.latest

This operation is secured and TLS encrypted end to end.

Prerequisites

Before you can use the neo4j-admin database upload command, you must meet the following prerequisites:

  • Verify that your Neo4j Aura instance is running.

  • Verify that your Neo4j Aura instance is accessible from the machine running neo4j-admin. Otherwise, the upload will fail with SSL errors.

Syntax

The neo4j-admin database upload command has the following syntax:

neo4j-admin database upload [-h] [--expand-commands] [--verbose]
                            [--overwrite-destination[=true|false]]
                            [--additional-config=<file>] --from-path=<path> [--to=<destination>]
                            [--to-password=<password>] --to-uri=<uri> [--to-user=<username>] <database>

Description

Push a local database to a Neo4j Aura instance. The target location is a Neo4j Aura Bolt URI. If Neo4j Cloud username and password are not provided either as a command option or as an environment variable, they will be requested interactively.

Parameters

Table 1. neo4j-admin database upload parameters
Parameter Description

<database>

Name of the database that should be uploaded. The name is used to select a dump file which is expected to be named <database>.dump.

Options

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

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

--additional-config=<file>

Configuration file with additional configuration.

--expand-commands

Allow command expansion in config value evaluation.

--from-path=<path>

/path/to/directory-containing-dump Path to a directory containing a database dump to upload.

-h, --help

Show this help message and exit.

--overwrite-destination[=true|false]

Overwrite the data in the target database.

false

--to=<destination>

The destination for the upload.

aura

--to-password=<password>

Password of the target database to push this database to. Prompt will ask for a password if not provided.

The value of the NEO4J_PASSWORD environment variable.

--to-uri=<uri>

neo4j://mydatabaseid.databases.neo4j.io Bolt URI of the target database.

--to-user=<username>

Username of the target database to push this database to. Prompt will ask for a username if not provided.

The value of the NEO4J_USERNAME environment variable.

--verbose

Enable verbose output.

Output

If the upload function completes successfully, it exits with the following log line:

“Your data was successfully pushed to Aura and is now running”.

If the upload function encounters an error at any point, you will be provided with instructions on how to try again or to contact Neo4j Aura support.

Additionally, you can use the --verbose option to enable verbose output.

Example

The following examples show how to use the neo4j-admin database upload command to upload a database dump to a Neo4j Aura instance. You need your Aura instance URI (neo4j+s://your-aura-instance-id.databases.neo4j.io), as can be seen in the Aura console, and your Aura instance password.

You should use the --overwrite-destination=true option to overwrite the target database. Otherwise, the command aborts and throws an error.

This command does not currently support private linking. Please raise a support ticket if you have public traffic disabled and need to use this command.

bin/neo4j-admin database upload <database> --from-path=<path-to-directory-with-database-dump> --to-uri=<neo4j+s://your-aura-instance-id.databases.neo4j.io> --overwrite-destination=true
Neo4j cloud database user name: neo4j
Neo4j cloud database password:
Upload
....................  10%
....................  20%
....................  30%
....................  40%
....................  50%
....................  60%
....................  70%
....................  80%
....................  90%
.................... 100%
We have received your export and it is currently being loaded into your Aura instance.
You can wait here, or abort this command and head over to the console to be notified of when your database is running.
Import progress
....................  10%
....................  20%
....................  30%
....................  40%
....................  50%
....................  60%
....................  70%
....................  80%
....................  90%
.................... 100%
Your data was successfully pushed to Aura and is now running.