Missing database data after server reboot


I just installed neo4j 4.1 on the Ubuntu machine and created some nodes and relationships by the neo4j browser. I used the default neo4j database.

Later I rebooted pc and restarted neo4j.
I had to log in with the default username and password. Dunno why, all credentials were reset and after logging in I had to change password. Everything was like a brand new installation. Also, my data was gone.

Isn't data supposed to be store on disk and load after reboot? Can I somehow get my data back?

Yes it is stored on disk. Oh, I do like a puzzle.

I imagine something changed when the system was rebooted, and Neo4j's default behavior is to create a new blank db.

First thoughts

  • there are some folders/places in Unix that are ephemeral by design, we might expect the db to disappear after reboot if it was stored on a memory disk, or in /tmp
  • Neo4j can use a variety of environment variables, if manually setup (but not added to the login scripts) those would be gone after a reboot

Where on disk was the neo4j db before the reboot, and where is it now?

Maybe you're looking at the wrong db? Remember that in 4.x Neo4j now supports multiple databases, so it's possible you connected to a different database than the one where you created the nodes?

Try running SHOW DATABASES to see what databases are present on the instance. If you see more than just neo4j and system, then try switching over to the other db and seeing if that's where your data is.