12.9. Push to Neo4j Aura

This section describes the push-to-cloud plugin for Neo4j Admin, which enables you to import data from an existing Neo4j instance to Neo4j Aura.

A local Neo4j database can be dumped and imported into a Neo4j Aura instance by using the push-to-cloud argument to the neo4j-admin tool.

12.9.1. Import database to Neo4j Aura

The neo4j-admin tool is located in the bin directory. Run it with the push-to-cloud argument in order to import your database into Neo4j Aura.

Syntax

neo4j-admin push-to-cloud --bolt-uri=<neo4j-cloud-bolt-uri> [--username=<neo4j-cloud-database-username>] [--password=<neo4j-cloud-database-password>] [--database=<name>] [--dump=</path/to/dump>] [--dump-to=</path/to/export/dump>] [--overwrite=<true/false>] [--verbose=<true/false>]

Options

Option Default Description

--database

graph.db

Name of database.

--dump

 

Path to database dump for upload. Cannot be used together with --database.

--dump-to

 

Optional.

Location to create the dump file if database is given. The dump will be exported to this location.

--bolt-uri

 

Neo4j Aura Bolt URI of the target location to push the database to.

--username

 

Optional.

Username of the target database to push this database to. If you do not provide a username, you will be prompted to provide one. Alternatively, the NEO4J_USERNAME environment variable can be used.

--password

 

Optional.

Password of the target database to push this database to. If you do not provide a password, you will be prompted to provide one. Alternatively, the NEO4J_PASSWORD environment variable can be used.

--overwrite

 

Optional.

Overwrite the data in the target database. If you do not provide either true or false, you will be prompted to select one.

--verbose

false

Optional.

Enable verbosity about internal details and errors.

Limitations

  • A Neo4j Aura database must already be provisioned and running.
  • Your database must be stopped before you run the push-to-cloud command. The push-to-cloud function cannot be used with a source database which is currently in use.
  • If used with a running source database, it will exit and print an error.

Output

If the push-to-cloud function completes successfully, it will exit with the following log line:

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

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

Example 12.16. Run the push-to-cloud command

Run with the --database option to dump a specific database name. Note that the database must be stopped first.

$neo4j-home> bin/neo4j stop
$neo4j-home> bin/neo4j-admin push-to-cloud --database=graph.db --bolt-uri=<neo4j-cloud-bolt-uri>
A non-empty database already exists at the given location, would you like to overwrite that database? Yes
Neo4j cloud database user name: neo4j
Neo4j cloud database password:
Dumped contents of database 'graph.db' into '$neo4-home/dump-of-graph.db-1569931327069'
Upload
....................  10%
....................  20%
....................  30%
....................  40%
....................  50%
....................  60%
....................  70%
....................  80%
....................  90%
.................... 100%
We have received your export and it is currently being loaded into your cloud 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 status
....................  10%
....................  20%
....................  30%
....................  40%
....................  50%
....................  60%
....................  70%
....................  80%
....................  90%
.................... 100%
Your data was successfully pushed to cloud and is now running.