sebastiandaschner blog
How to restore a Neo4J backup on managed Kubernetes (Video)
sunday, june 07, 2020In 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.
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:
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.
Found the post useful? Subscribe to my newsletter for more free content, tips and tricks on IT & Java: