Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
04-10-2020 03:55 PM
Hello! I am a beginner in Neo4j and I am carrying out a project in the area of Software Engineering with this database. In this moment of social isolation, I can no longer gather the team to work, so that the others have access to what I do I thought about the backup to send to them, but I don't know how to do it.
Can anyone help me with a step by step tutorial on how to make a backup on Neo4j? Explanatory images or video would help a lot ...
I wait ... Hugs to all!
Solved! Go to Solution.
04-11-2020 04:42 PM
Online backup is available only in Enterprise Edition, instructions here:
https://neo4j.com/docs/operations-manual/current/backup/performing/
For community, the best to backup is to fully stop the database, and then copy the data/databases folder, zipping it up. To restore you can unzip it in the right place, and restart the database. Do not take this kind of backup from community while the database is running.
04-11-2020 04:42 PM
Online backup is available only in Enterprise Edition, instructions here:
https://neo4j.com/docs/operations-manual/current/backup/performing/
For community, the best to backup is to fully stop the database, and then copy the data/databases folder, zipping it up. To restore you can unzip it in the right place, and restart the database. Do not take this kind of backup from community while the database is running.
04-11-2020 08:19 PM
Hello. I did what you said, followed the steps and it didn't work. any idea what happens?
04-12-2020 04:55 AM
I gave two different sets of steps and I'm not sure which you followed. Additionally you haven't provided any details on what went wrong, so I can't help you further here. Recommend you open a new topic, and put in the steps you followed and what the exact console outputs were.
04-12-2020 11:07 AM
I managed to accomplish. I used data folder compression backup. Before, he was uncrossing in the wrong place.
Thanks a lot for the help!!
09-03-2020 02:55 PM
Hello David,
I tried to do a backup/restore from one container to another container using Docker version of Neo4j Community Edition 4.1.
Directories in use:
home: /var/lib/neo4j
config: /var/lib/neo4j/conf
logs: /logs
plugins: /var/lib/neo4j/plugins
import: /var/lib/neo4j/import
data: /var/lib/neo4j/data
certificates: /var/lib/neo4j/certificates
run: /var/lib/neo4j/run
Starting Neo4j.
APOC couln't set a URLStreamHandlerFactory since some other tool already did this (e.g. tomcat). This means you cannot use s3:// or hdfs:// style URLs in APOC. This is caused by a limitation of the JVM which we cannot fix.
2020-09-03 21:23:18.441+0000 INFO Starting...
2020-09-03 21:23:20.620+0000 INFO ======== Neo4j 4.1.0 ========
2020-09-03 21:23:35.870+0000 ERROR Failed to start Neo4j on dbms.connector.http.listen_address, a socket address. If missing port or hostname it is acquired from dbms.default_listen_address. Error starting Neo4j database s
erver at /data/databases
java.lang.RuntimeException: Error starting Neo4j database server at /data/databases
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:198)
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:158)
at org.neo4j.server.CommunityBootstrapper.createNeo(CommunityBootstrapper.java:36)
at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:117)
at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:87)
at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:35)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.dbms.database.DefaultSystemGraphInitializer@78054f54' was successfully initialized, but failed to start. Please see the attached cause exceptio
n "Multiple components failed to initialize the system graph:
multi-database: org.neo4j.graphdb.DatabaseShutdownException: This database is shutdown.
security-users: org.neo4j.graphdb.DatabaseShutdownException: This database is shutdown.".
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:463)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:110)
09-03-2020 03:12 PM
I was able to get it to work by also copying the transactions folder, but would prefer not to since it is much larger than the databases folder.
Is there a command you should run on your database prior to shutting it down and copying the databases folder to perhaps make this work without having to also copy the transactions folder?
09-08-2020 10:44 AM
You really shouldn't just copy files on disk to perform a backup, this is generally not a safe operation -- the use of the backup tool is recommended. That being said, the transaction log itself is governed by these settings here, and can be adjusted to make the TX log on disk as big or as small as you like.
Obviously the smaller it is, the less history you're keeping, and the more trouble you're going to be in if you need to recover a store with an issue
09-08-2020 12:02 PM
I'm using the community edition of Neo4j. The backup tool is only available in the Enterprise edition. So the only way I know of to backup/restore is copying these files? Is that not correct for the community edition?
09-08-2020 12:57 PM
Even in the case of community, copying transaction files is not the right approach. The better way is to do offline load/dump like this:
https://neo4j.com/docs/operations-manual/current/tools/dump-load/
01-01-2021 08:34 PM
Hi David,
I've been trying to get this to work for several days without success. I'm using the community edition.
My process is:
Then to test the backup
5) Stop server
6) Pull down the dump from S3
7) Load dump into the same server and neo4j database (using force)
8) Start server
After doing this, whenever I use the browser to attempt to look at the database it says it is "offline"
Any ideas?
David
09-08-2020 01:15 PM
Thanks David.
The problem I had initially was I could not stop the database in my docker container. The STOP command is only available in the Enterprise Edition.
If you're running Neo4j in a docker container and want to perform an offline backup, you need to start the container without starting the normal Neo4j services. Then you can use the dump tool to perform a backup.
I found the solution mentioned here
09-19-2022 03:05 PM
I had this problem as well and ended up using the Bitnami Neo4j CE AMI instead of Docker on EC2. We were using the official Neo4j CE AMI but they stopped supporting it for EC2.
10-12-2022 11:55 AM
### restore from backup ###
All the sessions of the conference are now available online