cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

How to backup a db running in kubernetes

ticapix
Node Link

Hello

I've read the How to backup Neo4j Running in Kubernetes it seems that either the tool has change since the redaction of the article or that I'm not using the correct version of neo4j.

I've deployed neo4j with helm3 in a k8s 1.17 cluster (hosted by ovh.com)

helm install --namespace neo4j db stable/neo4j --set imageTag=4.0.3

I would like to do a DB backup and restore but I'm facing two issues:

  1. the doc says the database must be stopped
  2. all code I see refers to neo4j-admin backup but I only see neo4j-admin dump with no parameter to specify host/user/password when running the image with
    kubectl run -it --rm neo4j-admin --image=neo4j:4.0.3 --restart=Never --namespace neo4j --command -- bash

Any ideas how to dump/load or backup/restore a neo4j community db running in a kubernetes cluster ?

best regards,

4 REPLIES 4

There is a difference between dump/load and backup/restore. The dump/load commands are strictly offline operations, while backup/restore are online operations.

To do this with kubernetes, you should use the online option of backup/restore, and the articles you're following are the right ones to go to.

The existing operations manual documentation for Neo4j is rather focused on running in the context of an actual machine or VM rather than running in kubernetes, where special considerations apply.

ticapix
Node Link

Thank you for the semantic clarification. Indeed backup/restore is what I'm after.
When we read the code associated with the post, the neo4j-admin backup command is used.

But using the latest neo4j-4.0.3 docker image, I don't see the backup option.

Is that a difference because of the version 3.4 vs 4.0 or because your code uses the enterprise version and I'm using the community one ?

$ kubectl run -it --rm neo4j-utils
--image=neo4j:4.0.3 --restart=Never --namespace neo4j --command -- bash
If you don't see a command prompt, try pressing enter.
root@neo4j-utils:/var/lib/neo4j# ./bin/neo4j-admin -V
4.0.3
root@neo4j-utils:/var/lib/neo4j# ./bin/neo4j-admin
Usage: neo4j-admin [-hV] [COMMAND]
Neo4j database administration tool.
  -h, --help      Show this help message and exit.
  -V, --version   Print version information and exit.
Commands:
  help                  Displays help information about the specified command
  memrec                Print Neo4j heap and pagecache memory settings recommendations.
  dump                  Dump a database into a single-file archive.
  store-info            Print information about a Neo4j database store.
  report                Produces a zip/tar of the most common information needed for remote assessments.
  load                  Load a database from an archive created with the dump command.
  check-consistency     Check the consistency of a database.
  import                Import a collection of CSV files.
  set-default-admin     Sets the default admin user.
                        This user will be granted the admin role on startup if the system has no roles.
  set-initial-password  Sets the initial password of the initial admin user ('neo4j'). And removes the requirement to
                          change password on first login.
root@neo4j-utils:/var/lib/neo4j#

ticapix
Node Link

The backup/restore is only available in the enterprise edition.

It's true that backup/restore is an enterprise feature. Additionally, there are big differences between 3.5 and 4.0 that bear on the configuration