The following points are taken from the Up gradation Link
1. Cleanly shut down the older version of Neo4j, if it is running.
2. Install Neo4j 2.1.5, and set it up to use the same database store directory (typically data/graph.db).
3. Set the Neo4j configuration parameter allow_store_upgrade=true in your conf/neo4j.properties file. Neo4j will fail to start without this configuration set.
4. Start up Neo4j.
5. The database store upgrade will occur during startup.
6. The allow_store_upgrade configuration parameter should be removed, set to false or commented out.
7. Information about the upgrade and a progress indicator are logged into the messages.log file, inside the database store directory.
The sixth point, After starting the higher version of neo4j, should we again set allow_store_upgrade=false.
I have followed the same steps, but the older database which was 10gb after upgrading to new version, database size is only 1.7gb.
I am worried, all my relations that are imported in older version can be seen in newer version?
Any suggestions.
You're mentioning "from 2.1 to 2.3". Please note that as of today there's just a milestone build from 2.3 M01 available. Upgrading a database from a milestone version is not guaranteed, see release notes.
Aside from your graph data itself the graph.db directory contains (depending on your config) transaction logs. These might be a large fraction of the complete directory.
To be sure that your datastore is consistent, use the consistency checker, see http://www.markhneedham.com/blog/2014/01/22/neo4j-backup-store-copy-and-consistency-check/.
Yes, you should complete step #6 after you have successfully started up the new version once (which is what triggers the upgrade). Perhaps a slightly more detailed process could be written as:
4. Start up Neo4j.
5. The database store upgrade will occur during startup.
6. Review information about the upgrade contained in the messages.log file, inside the database store directory.
7. After a successful upgrade:
7a. Shut down Neo4j
7b. Remove, comment out or set to false the allow_store_upgrade configuration parameter.
7c. Start up Neo4j.
Related
I'm trying to install the APOC Full jar file (4.2.0.6) to my Neo4J instance that's running in a Google Compute VM. To do so, I've installed the JAR file from GitHub releases to the /plugins folder. Each time I restart or run the environment it crashes with the following output to logs:
"Some jar procedure files (apoc-4.2.0.6-all.jar) are invalid, see log for details."
There's really no additional details provided...
If I copy the default APOC Core library found withing /labs, it works. I've tried to download this same file from Github and it fails. I've verified that the same user/group permissions are applied to the downloaded file as well.
Any ideas?
This usually happens for two reasons:
First is version mismatch. You can check which version you should use based on the version matrix, which is available at: https://github.com/neo4j-contrib/neo4j-apoc-procedures#version-compatibility-matrix. Unfortunately, it is not always up to date, but the APOC versions are if I understand correctly:
APOC 4.1.x.x -> Neo4j 4.1.x
APOC 4.2.x.x.-> Neo4j 4.2.x
APOC 4.3.x.x -> Neo4j 4.3.x
If I had to guess, you are probably using Neo4j 4.3 or 4.1 and using an APOC that is designed to work with Neo4j 4.2.
The other issue is that sometimes you have multiple APOC plugin files in the plugin folders, so that will also crash Neo4j.
How can we recover a dump from a database version 3.0.3 to the actual version 4.1.3 Community?
I've searched and tried many different alternatives, but no one have still worked.
In one of this alternatives we've tried the command
neo4j-admin backup --backup-dir=/home/ec2-user --verbose,
but the commands to recover are not working, for example:
neo4j-admin restore --from=/var/lib/neo4j/data/databases/neo4j --database=system --force
We are getting the error message:
WARNING: Max 1024 open files allowed, minimum of 40000 recommended. See the Neo4j manual.
Unmatched arguments from index 0: 'restore', '--from=/var/lib/neo4j/data/databases/neo4j', '--verbose', '--database=neo4j', '--force'
Did you mean: store-info or report or memrec?
This seems like a reasonable (but time-consuming) approach:
If you do not have neo4j 3.0.3 installed, get it from here (as documented here), and install it.
Follow the simple 3.0 instructions for restoring a backup (to your 3.0.3 installation). The 3.0 restoration process is very different from the 4.x process.
Upgrade the 3.0.3 installation to 4.1.3, stepwise, by:
upgrading to 3.3, then
upgrading to 3.5.22, then
migrating to 4.x
Good luck.
The community edition of neo4j doesn't have the restore command, only the enterprise edition does. You can take a look at the table here.
I use the neo4j community edition on windows to see a database.
The path of database is D:\Alamgir\neo4jdb.
When start it shows:
Failed to start Neo4j with an older data store version.
To enable automatic upgrade, please set configuration parameter "allow_store_upgrade=true"
I update the parameter on neo4j.properties and neo4j.conf just like this:
But it still doesn't work .What can I do? Help~
You need to uncomment the line in the config file, i.e. remove the preceding #:
allow_store_upgrade=true
I have an instance in AWS hosting a Neo4j DB.
The version im using is 2.3.1.
I backed it up using "neo4j-backup".
I then zipped the files and uploaded to an external storage.
I wanted to restore the DB to another instance I have using the same version (2.3.1), so I copied the files to the same folder the 1st instance is using.
When I run the neo4j console command it states:
ERROR Neo4j cannot be started, because the database files require upgrading and upgrades are disabled in configuration. Please set 'allow_store_upgrade' to 'true' in your configuration file and try again.
Of course the "allow_store_upgrade" is commented out,
Do I have to do the upgrade when restoring?
How can I find the DB version?
If you're using the same version you shouldn't need to comment it out. Though I don't think it would harm anything if you do (especially if you still have that backup somewhere else).
You should be able to find the version of Neo4j in the CHANGES.txt / README.txt files. It should also output the version in data/graph.db/messages.log when you start up the server. Also if you go to the web console (at http://localhost:7474 by default) it will show you the version.
I just upgraded my Neo4J from 1.9.4 to 2.0.1 newest stable release.
The upgrade instructions say that you can just start the new Neo4J with the old database provided that
allow_store_upgrade=true
which is exactly what I did.
However, when I copied my old graph.db folder (which contains all data) into the data folder of the new installation and tried to run neo4j for the first time, it didn't work. The error message I got in terminal upon neo4j start was
Using additional JVM arguments: -server -XX:+DisableExplicitGC -
Dorg.neo4j.server.properties=conf/neo4j-server.properties -
Djava.util.logging.config.file=conf/logging.properties -
Dlog4j.configuration=file:conf/log4j.properties -XX:+UseConcMarkSweepGC -
XX:+CMSClassUnloadingEnabled
Starting Neo4j Server...WARNING: not changing user
process [462]... waiting for server to be ready... Failed to start within 120 seconds.
Neo4j Server may have failed to start, please check the logs.
When I removed the graph.db folder from the new installation and ran neo4j start once again, it all started fine, but with a new clean database, of course.
FIY I run it on Mac OS X 10.9, the newest Java 1.7.0_51-b13 SDK installed.
Does anybody know what I did wrong? Thank you!
Ok, I found a solution. The upgrade instructions say that you should uncomment this string in conf/neo4j.properties:
#allow_store_upgrade=true
But what they don't say is that you should uncomment is in the OLD database BEFORE you shut it down the one last time in the old version.
Then, when you install the new database, just copy the graph.db folder into the /data folder of the new 2.0.1 Neo4J, then, before launching it, go to /conf folder of the NEW database, find that same neo4j.properties file, UNCOMMENT that same line:
allow_store_upgrade=true
Then launch the new 2.0.1 Neo4J database for the first time, make sure the data is all fine.
Don't forget to then comment that option once you shut down the database.
A bit of a complicated way to update, would be great if Neo4J provided a better and more streamlined way to do that...