Home » Java » Enterprise Java » How to restore a Neo4J backup on managed Kubernetes

About Sebastian Daschner

Sebastian Daschner
Sebastian Daschner is a self-employed Java consultant and trainer. He is the author of the book 'Architecting Modern Java EE Applications'. Sebastian is a Java Champion, Oracle Developer Champion and JavaOne Rockstar.

How to restore a Neo4J backup on managed Kubernetes

In the following video I’ll explain how to restore backups of Neo4J instances to a fresh instance that runs in a managed Kubernetes environment. The backup contents will be taken from a persistent volume to which we previously wrote the backup.

In this previous post you can see how to take backups in the first place.

Try it yourself

Again, you’ll find the Kubernetes resources in the following GitHub repository.

1
2
3
cd /tmp/
git clone https://github.com/sdaschner/neo4j-tools
cd neo4j-tools/

We need to ensure that we have the backupdir- and datadir- persistent volumes available. You can have a look at the previous posts and the video on how we got there. The data directory only contains an empty database which we will restore from the backup.

The following pod will bind both volumes, restore the backup and write the result to the data directory which afterwards can be used again in our Neo4J instance:

1
2
3
4
kubectl apply -f backup/neo4j-restore-backup.yaml
 
NAME                               READY   STATUS      RESTARTS   AGE
neo4j-restore-backup               0/1     Completed   0          13s

If we now start our Neo4J instance again, for example the single core instances, we will see that the database contents have been restored.

Published on Java Code Geeks with permission by Sebastian Daschner, partner at our JCG program. See the original article here: How to restore a Neo4J backup on managed Kubernetes (Video)

Opinions expressed by Java Code Geeks contributors are their own.

(0 rating, 0 votes)
You need to be a registered member to rate this.
Start the discussion Views Tweet it!
Do you want to know how to develop your skillset to become a Java Rockstar?
Subscribe to our newsletter to start Rocking right now!
To get you started we give you our best selling eBooks for FREE!
1. JPA Mini Book
2. JVM Troubleshooting Guide
3. JUnit Tutorial for Unit Testing
4. Java Annotations Tutorial
5. Java Interview Questions
6. Spring Interview Questions
7. Android UI Design
and many more ....
I agree to the Terms and Privacy Policy
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments