Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
03-24-2019 07:16 AM
I am running a neo4j database from an EC2 instance on on AWS. Unfortunately, I recently lost my personal hard drive, and now I can no longer access my PEM (private key) file. That means that I can no longer SSH into the instance. AWS does have a way of changing the key pair for an EC2 instance where the root device is type ebs, but the data in directories /dev/sdb and sdc will be lost.
I have no way of backing up that data, because again I can no longer SSH in. So the question is, if I delete those directories, will I lose any of the data in the database?
03-24-2019 07:30 AM
depends on where your data directory resides.
The device names don't tell you much if you don't know where they are mounted ...
if the db is still running and you can access it, you could export it e.g. with the apoc.export procedures.
if it's an enterprise instance you might even use the backup tool in the same network
03-24-2019 07:44 AM
It is enterprise (neo4j-enterprise-1-3.4.1 2018-06-14T07_13_29Z (ami-2a652655)) and the db is running. But when I tried exporting I got:
Neo.ClientError.Procedure.ProcedureCallFailed: Failed to invoke procedure apoc.export.cypher.all
: Caused by: java.lang.RuntimeException: Export to files not enabled, please set apoc.export.file.enabled=true in your neo4j.conf
If I understand, I can't access my neo4j.conf file right now because I can't ssh in anymore. So I don't see how to enable exporting capability.
The AWS support center told me that "whoever created this instance should be aware that the instance store shouldn't be used for persistence data". I'm not clear on how EBS works, but if I used an image from neo4j could I assume that the data is stored in a persistent way?
03-24-2019 07:36 AM
Advanced troubleshooting mode.
let me know how it goes.
03-24-2019 07:45 AM
Thanks, if I do this, when I stop the original instance will data from the database be lost?
03-24-2019 08:53 AM
Many thanks to @dominicvivek06 (and @michael.hunger) of course.
I just want to update this in case anyone else has the same situation. According to Dominic, the answer (for an Enterprise AMI) is that the data on the database should not be lost by following the process that he gave above, which is essentially the same as https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html#replacing-lost-key-pair.
All the sessions of the conference are now available online