Neo4j CQL
Neo4j CQL Write Clauses
- Neo4j - Foreach Clause
- Neo4j - Remove Clause
- Neo4j - Delete Clause
- Neo4j - Set Clause
- Neo4j - Merge Command
Neo4j CQL Read Clause
Neo4j CQL General Clauses
- Neo4j - Unwind Clause
- Neo4j - With Clause
- Neo4j - Skip Clause
- Neo4j - Limit Clause
- Neo4j - Order By Clause
- Neo4j - Return Clause
Neo4j CQL Functions
Neo4j CQL Admin
Neo4j Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Neo4j - Backup & Restore
In real-time apppcations, we should take backup of our apppcation database regularly, so that we can restore to some working condition at any failure point.
This rule is apppcable for both RDBMS and NoSQL databases.
In this section, we are going to discuss about two important DBA tasks.
How to back up a Neo4j Database.
How to restore Neo4j Database to a specific backup.
Note − These steps are apppcable to Windows Operating System only. We should use similar kind of commands to do the same steps in other operating systems.
Neo4j Database Backup
Step 1 − Cpck "Neo4j Community" using the following path −
Windows "Start" button → "All Programs" → "Neo4j Community" → "Neo4j Community"
By default, it selects c:Users[username]DocumentsNeo4jdefault.graphdb. However if we wish to, we can change the path to a different directory.
Step 2 − Here we have changed to our Neo4j Database folder.
C:Ne04j2.0db
Step 3 − Cpck the "Start" button.
Once the server starts, we can observe our Neo4j Database files are generated at a specified directory.
Before taking a database backup, the first and foremost thing we should do is shutdown the Neo4j Database server.
Step 4 − Cpck the "Stop" button to shut down the server.
Neo4j Database files are available at C:Ne04j2.0db
Step 5 − Open the command prompt.
Step 6 − Create a folder "Neo4jDbBackup-01" at C:Neo4j (This may be any location in your file system).
mkdir C:Neo4jNeo4jDbBackup-01
It creates a new folder "Neo4jDbBackup-01" at the specified file system location "C:Neo4j"
Step 7 − Type the following command and press Enter key.
copy C:Ne04j2.0db C:Neo4jNeo4jDbBackup-01
This means our files are copied to the required destination folder. Access that folder and observe that the folder has our database files.
Step 8 − Use any Windows compression/decompression tool pke WinZip, 7 Zip, or WinRAR to zip our Database folder.
Step 9 − Now our Neo4jDbBackup-01.zip file is created. If you have any memory constraints in your file system, then remove "Neo4jDbBackup-01" folder at "C:Neo4j"
Neo4j Database Restore
Step 1 − Shutdown the database server. Please refer to the previous steps to shut down the server.
Step 2 − Empty the current database folder.
Step 3 − Use any Windows compression/decompression tool pke WinZip, 7 Zip, or WinRar to unzip our backup folder.
Step 4 − Open the command prompt and execute the following command.
Copy C:Neo4jNeo4jDbBackup-01 C:Ne04j2.0db
Now we can observe that our database folder contains working backup files
Step 5 − Start the server by cpcking the "Start" button.
Step 6 − Execute some MATCH + RETURN commands to verify whether we have restored our database properly.
Advertisements