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.

Neo4j Causal Cluster Backup & Restore

Reference Documentation: Back up and restore a database in Causal Cluster - Operations Manual

We performed the backup of Neo4j Causal Cluster (Implemented on 3 AWS EC2 Instances) on one of the nodes in the Cluster referring to the above mentioned documentation. The backup was successful. But when we did the restore of the database following the steps mentioned in the above documentation, the terminal did not show any error for the restore command but in the browser when we executed "show databases;" command we got the following error for one of the nodes

| name | address | role | requestedStatus | currentStatus | error | default |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| "neo4j" | "node 2 domain name:7687" | "leader" | "online" | "online" | "" | TRUE |

| "neo4j" | "node 1 domain name:7687" | "unknown" | "online" | "dirty" | "An error occurred! Unable to create new database neo4j." | TRUE |

| "neo4j" | "node 3 domain name:7687" | "follower" | "online" | "online" | "" | TRUE

Then we executed ":use neo4j" on the node 1 which is showing the above issue, we got the message as "Database with the "neo4j" name could not be found". But the same command was working on other nodes.

Also when we executed the command "Match (n) return (n)" to check if the records were restored, it was showing "no records present".

What could be the reason for the restore not working on Neo4j Causal Cluster Implemented on AWS EC2 Instances? Is there any documentation that we can refer, to perform the backup and restore? Is the above documentation correct? Please guide us.

Thank You

1 ACCEPTED SOLUTION

@pablo.crotti1
what you describe should just work as the file structure for a database as it exists in a casual cluster is 99% the same as in a single instance. The 1% difference is simply because there are additional files in a causal cluster database which describe the other members of the cluster. However even if these files are present in a single instance they are not read.

In fact you should be able to for example stop one of the followers change its dbms.mode=CORE to dbms.mode=SINGLE and now if you start this instance it will behave as its separate unique Neo4j instance. I'm not entirely recommending that you do this and specifically if you were and then update data in the graph and in the single instance then your should not revert dbms.mode so as to return it to the cluster since you will have mismatch in data among the cluster members. You can start the single instance as a test and simply run read queries.

As you state everything is fine post restore using cypher-shell but not with Neo4j Browser, then this would presumably point to a failure with Browser and not a failure with the restore itself. If you start a browser in Incognito mode or similar is the same behavior experienced whereby you still cant see nodes/data ????

View solution in original post

5 REPLIES 5

Best create a support ticket and provide the logs of all cluster members and of the restore process.
There should be something in debug.log in node 1 that indicates the issue

Hi there ! I was wondering if a solution was found for this issue.
We are facing a similar issues on our side:

We have a causal cluster (1 Leader and 2 Followers) on which we have performed a backup on , using the neo4j-admin backup command.

However, in our case, we are trying to restore the backup on a standalone (enterprise) server to be able to work offline on the data (i.e., it's part of our data lab).

Once we have restored the backup, created the database and ran the metadata file with cypher-shell, everything looks okay in the console, however, in Neo4J browser, in the newly created/restored database, the nodes do not show up.

My question is the follow: is it possible to backup a causal cluster and restore it on a standalone server, and, is there a specific way to restore it ?

We are currently working with Neo4J Enterprise 4.2.2.

Thanks a lot for your help.

@pablo.crotti1
what you describe should just work as the file structure for a database as it exists in a casual cluster is 99% the same as in a single instance. The 1% difference is simply because there are additional files in a causal cluster database which describe the other members of the cluster. However even if these files are present in a single instance they are not read.

In fact you should be able to for example stop one of the followers change its dbms.mode=CORE to dbms.mode=SINGLE and now if you start this instance it will behave as its separate unique Neo4j instance. I'm not entirely recommending that you do this and specifically if you were and then update data in the graph and in the single instance then your should not revert dbms.mode so as to return it to the cluster since you will have mismatch in data among the cluster members. You can start the single instance as a test and simply run read queries.

As you state everything is fine post restore using cypher-shell but not with Neo4j Browser, then this would presumably point to a failure with Browser and not a failure with the restore itself. If you start a browser in Incognito mode or similar is the same behavior experienced whereby you still cant see nodes/data ????

Hi Dana,

Thanks a lot for your detailed response ! I finally managed to make it work, as in, backup the causal cluster using neo4-admin backup, and restore the backup onto a standalone version of Neo4j Enterprise with neo4j-admin restore.

Indeed it was a problem with the browser. It looks like it was still pointing to a local version of my database (whereas the standalone version was on a remote VM).

In any cases, now it works.

Thanks a lot .

hello,
I am a beginner and facing the same issue. can someone please guide me.
Thankyou!