Sometimes as an AuraDB Instance administrator, you might just want to delete everything in an AuraDB Instance.
One bad way (avoid using this as it may overwhelm your AuraDB Instance) to do it is to use this statement:
MATCH (n) DETACH DELETE n
The recommended Cypher way is to use the method described in Deleting large numbers of nodes..
SOLUTION:
When you do have an AuraDB instance and you want to delete everything (all data and metadata, but not the users and roles), you should consider using these steps:
- Restore your AuraDB Instance from a known empty backup
or - Load (drag & drop from the console or push-to-cloud) and empty Dump/Export file. There is an empty backup/Dump file generated at the same time the database is created.
Alternatively if you are not sure to have an empty Dump file :
- Create a Neo4j database on your local desktop by using the same AuraDB version you are using.
- Shut down the database and create a dump file for this newly created empty database.
- Import the dump file to the AuraDB.
After you perform these steps you will get an empty AuraDB when the import is completed and the database is running.
Important note: loading a Neo4j database dump does not affect the System database (roles, users, RBAC), so it is safe if you just want to delete or remove all the data in the Neo4j database.
Comments
0 comments
Please sign in to leave a comment.