Migrate the Neo4j configuration file
You can use the migrate-configuration
command to migrate a legacy Neo4j configuration file to the current format.
The new version will be written in a target configuration directory.
The default location for both the source and target configuration directory is the configuration directory specified by NEO_CONF
or the default configuration directory for this installation.
If the source and target directories are the same, the original configuration files will be renamed.
A configuration provided using --additional-config
option will not be migrated.
Why use the command?
|
Syntax
The neo4j-admin server migrate-configuration
command has the following syntax:
neo4j-admin server migrate-configuration [-h] [--expand-commands] [--verbose] [--from-path=<path>] [--to-path=<path>]
Options
The neo4j-admin server migrate-configuration
command has the following options:
Option | Description |
---|---|
|
Allow command expansion in config value evaluation. |
|
Path to the configuration directory used as a source for the migration. |
|
Show this help message and exit. |
|
Path to a directory where the migrated configuration files should be written. |
|
Enable verbose output. |
Example
The following example shows how to migrate a legacy configuration file to the current format:
bin/neo4j-admin server migrate-configuration --from-path=/path/to/legacy/neo4j-enterprise-4.4.10/conf/ --to-path=/path/to/new/neo4j-enterprise-5.26.0/conf/
Keeping original user-logs.xml file at: /neo4j-enterprise-5.1.0/conf/user-logs.xml.old User logging configuration xml file generated: /neo4j-enterprise-5.1.0/conf/user-logs.xml Keeping original server-logs.xml file at: /neo4j-enterprise-5.1.0/conf/server-logs.xml.old Server logging configuration xml file generated: /neo4j-enterprise-5.1.0/conf/server-logs.xml dbms.directories.import=import MIGRATED -> server.directories.import=import dbms.tx_state.memory_allocation=ON_HEAP MIGRATED -> db.tx_state.memory_allocation=ON_HEAP dbms.connector.bolt.enabled=true MIGRATED -> server.bolt.enabled=true dbms.connector.http.enabled=true MIGRATED -> server.http.enabled=true dbms.connector.https.enabled=false MIGRATED -> server.https.enabled=false metrics.csv.rotation.compression=zip MIGRATED -> server.metrics.csv.rotation.compression=zip dbms.jvm.additional=-XX:+UseG1GC MIGRATED -> server.jvm.additional=-XX:+UseG1GC dbms.jvm.additional=-XX:-OmitStackTraceInFastThrow MIGRATED -> server.jvm.additional=-XX:-OmitStackTraceInFastThrow dbms.jvm.additional=-XX:+AlwaysPreTouch MIGRATED -> server.jvm.additional=-XX:+AlwaysPreTouch dbms.jvm.additional=-XX:+UnlockExperimentalVMOptions MIGRATED -> server.jvm.additional=-XX:+UnlockExperimentalVMOptions dbms.jvm.additional=-XX:+TrustFinalNonStaticFields MIGRATED -> server.jvm.additional=-XX:+TrustFinalNonStaticFields dbms.jvm.additional=-XX:+DisableExplicitGC MIGRATED -> server.jvm.additional=-XX:+DisableExplicitGC dbms.jvm.additional=-XX:MaxInlineLevel=15 MIGRATED -> server.jvm.additional=-XX:MaxInlineLevel=15 dbms.jvm.additional=-XX:-UseBiasedLocking MIGRATED -> server.jvm.additional=-XX:-UseBiasedLocking dbms.jvm.additional=-Djdk.nio.maxCachedBufferSize=262144 MIGRATED -> server.jvm.additional=-Djdk.nio.maxCachedBufferSize=262144 dbms.jvm.additional=-Dio.netty.tryReflectionSetAccessible=true MIGRATED -> server.jvm.additional=-Dio.netty.tryReflectionSetAccessible=true dbms.jvm.additional=-Djdk.tls.ephemeralDHKeySize=2048 MIGRATED -> server.jvm.additional=-Djdk.tls.ephemeralDHKeySize=2048 dbms.jvm.additional=-Djdk.tls.rejectClientInitiatedRenegotiation=true MIGRATED -> server.jvm.additional=-Djdk.tls.rejectClientInitiatedRenegotiation=true dbms.jvm.additional=-XX:FlightRecorderOptions=stackdepth=256 MIGRATED -> server.jvm.additional=-XX:FlightRecorderOptions=stackdepth=256 dbms.jvm.additional=-XX:+UnlockDiagnosticVMOptions MIGRATED -> server.jvm.additional=-XX:+UnlockDiagnosticVMOptions dbms.jvm.additional=-XX:+DebugNonSafepoints MIGRATED -> server.jvm.additional=-XX:+DebugNonSafepoints dbms.jvm.additional=-Dlog4j2.disable.jmx=true MIGRATED -> server.jvm.additional=-Dlog4j2.disable.jmx=true dbms.windows_service_name=neo4j MIGRATED -> server.windows_service_name=neo4j Keeping original configuration file at: /neo4j-enterprise-5.1.0/conf/neo4j.conf.old
The example output is not to be used to populate a new Neo4j 5 neo4j.conf file. The 5.x syntactically correct configuration file can be found at /path/to/new/neo4j-enterprise-5.26.0/conf/, where |