Showing results for 
Search instead for 
Did you mean: 

How to backup remote Neo4j database running in Kubernetes

We wish to run a scheduled backup of a Neo4j database running in an Azure Kubernetes cluster. The database pod has the following specs:
Name: neo4j-core-0
Image: neo4j:4.1.0
Environment Variables: NEO4J_dbms_backup_enabled: "true"

We created a separate pod to remotely perform the online backups, which has the following specs:
Name: neo4j-core-backup
Image: neo4j:4.1.0-enterprise
Environment Variables: NEO4J_ACCEPT_LICENSE_AGREEMENT: yes
NEO4J_dbms_backup_enabled: "true"

We are able to query neo4j-core-0 from neo4j-core-backup using cypher-shell:
cypher-shell -A neo4j-core-0-URL:7687 -u neo4j -p mypassword

However, we are getting a 'Connection Refused" error when trying to backup neo4j-core-0 from neo4j-core-backup using neo4j-admin backup (using either port 7687 or 6362). Any suggestions how to resolve?
neo4j-admin backup --backup-dir=./backup --verbose --from=neo4j-core-0-URL:7687 --database=neo4j --pagecache=4G

--> 2020-08-20 16:40:04.445+0000 INFO [c.n.c.p.i.ClientChannelInitializer] Initializing client channel [id: 0x235e58c8]
org.neo4j.cli.CommandFailedException: Execution of backup failed. finishConnect(..) failed: Connection refused
at com.neo4j.backup.impl.OnlineBackupCommand.execute(
at picocli.CommandLine.executeUserObject(
at picocli.CommandLine.access$900(
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(
at picocli.CommandLine$RunLast.handle(
at picocli.CommandLine$RunLast.handle(
at picocli.CommandLine$AbstractParseResultHandler.execute(
at picocli.CommandLine.execute(
at org.neo4j.cli.AdminTool.execute(
at org.neo4j.cli.AdminTool.main(
Caused by: com.neo4j.backup.impl.BackupExecutionException: com.neo4j.causalclustering.catchup.storecopy.DatabaseIdDownloadFailedException: java.util.concurrent.ExecutionException:$AnnotatedConnectException: finishConnect(..) failed: Connection refused: /XX.XXX.XX.XX:6362


Node Clone

Good day,

What do you use as a persistent storage? Could you verify that 6362 is open on your core-0? There is a good article on k8s -, so you may try their helm chart as well.