Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
11-08-2018 02:07 PM
I run a 3 server CORE cluster and I regularly seed an identical cluster with the production data for testing purposes. I seed from a backup created using neo4j-admin backup
. In the past I've always used the following procedure to seed the cluster:
neo4j-admin unbind --database=graph.db
on each serverRecently I started using neo4j-admin restore
instead of just copying the backup directory to graph.db. Every time I do this, I run a md5 digest command on the backup directory and the resulting graph.db directory and every time they are identical.
So my question is: does neo4j-admin restore
do anything other than copy the backup files?
I ask because my database is 120Gb so it's much faster to directly scp
the backup to the graph.db
on the other servers instead of having to scp
then neo4j-admin restore
.
This is the command I use to generate the digest for a whole directory. It only works if your current working directory is the directory you are generating the digest for:
find "." -type f -print0 | sort -z | xargs -r0 md5sum | md5sum
11-13-2018 10:28 AM
I can't answer authoritatively about restore, but I believe the backup tool which produces the set you'd be using does various kinds of integrity checks you'd be missing if you just copied graph.db. And so it's not the same as just copying the files. Another difference is that you can take backups while the database is online, while copying the underlying files would almost certainly result in a backup set with problems if your database was still running.
I wouldn't recommend copying the graph.db folder, because these are considered implementation details which could change with time. Neo4j-admin is going to stay supported, where in future versions raw copying the directory could break, as users aren't technically supposed to access the files on disk directly.
11-13-2018 10:49 AM
I'm not sure you understood my question. I'm not copying graph.db, I'm only copying the backup folder which was created earlier with neo4j-admin backup
eg.
service neo4j stop
neo4j-admin unbind --database=graph.db
rm -r /var/neo4j/data/databases/graph.db
cp /var/neo4j/backup/3.4.9 /var/neo4j/data/databases/graph.db
service neo4j start
The cp
step is producing byte for byte identical results to neo4j-admin restore
.
All the sessions of the conference are now available online