deepfence / ThreatMapper

Open Source Cloud Native Application Protection Platform (CNAPP)
https://deepfence.io
Apache License 2.0
4.82k stars 582 forks source link

Neo4j recovery #1227

Closed noboruma closed 1 year ago

noboruma commented 1 year ago

After a crash (typically Java Heap OOM) or when the disk filesystem is saturated, neo4j DB is in inconsistent state. There is little we can achieve in that state as the DB is not accessible.

What was tried:

Given that the tooling around backup is only available in neo4j enterprise edition, we need to come up with our own strategy. We need to add a snapshot mechanism on neo4j so we can go back in stable state if something wrong happens.

noboruma commented 1 year ago

Added backup mechanism to neo4j: https://github.com/deepfence/ThreatMapper/commit/8d4b87da250fc5da5592cc7420f409eceaa64f87 Next step: See how we can use remote volumes in k8s

noboruma commented 1 year ago

For record, we can keep PV volumes by following: https://acv.engineering/posts/migrating-a-kubernetes-pvc/ For docker, we have utils to tar/untar the volume and do migration manually No more actions for this task, resolving.