From c00cc858f445cee0046eaf289d9bacdd4017e0c1 Mon Sep 17 00:00:00 2001 From: Reneta Popova Date: Tue, 1 Apr 2025 16:23:27 +0100 Subject: [PATCH 1/5] Strip Tools section out and put the pages in their relevant places --- modules/ROOT/content-nav.adoc | 26 +- .../password-and-user-recovery.adoc | 8 +- .../ROOT/pages/backup-restore/aggregate.adoc | 2 +- .../pages/backup-restore/copy-database.adoc | 2 +- modules/ROOT/pages/backup-restore/index.adoc | 1 + .../ROOT/pages/backup-restore/inspect.adoc | 2 +- .../pages/backup-restore/offline-backup.adoc | 2 +- .../pages/backup-restore/online-backup.adoc | 2 +- .../ROOT/pages/backup-restore/planning.adoc | 2 +- .../pages/backup-restore/restore-backup.adoc | 6 +- .../pages/backup-restore/restore-dump.adoc | 2 +- .../clustering/clustering-advanced/index.adoc | 1 + .../pages/clustering/disaster-recovery.adoc | 2 +- modules/ROOT/pages/clustering/index.adoc | 1 + .../configuration/command-expansion.adoc | 2 +- .../pages/configuration/file-locations.adoc | 2 +- modules/ROOT/pages/configuration/index.adoc | 5 +- .../database-administration/queries.adoc | 2 +- .../ROOT/pages/database-internals/index.adoc | 2 + .../database-internals/store-formats.adoc | 6 +- modules/ROOT/pages/docker/operations.adoc | 18 +- .../ROOT/pages/installation/linux/debian.adoc | 2 +- .../ROOT/pages/installation/linux/rpm.adoc | 2 +- modules/ROOT/pages/introduction.adoc | 6 +- .../ROOT/pages/kubernetes/import-data.adoc | 2 +- modules/ROOT/pages/monitoring/index.adoc | 3 +- .../performance/memory-configuration.adoc | 4 +- modules/ROOT/pages/tools/cypher-shell.adoc | 626 ------ modules/ROOT/pages/tools/index.adoc | 24 - .../neo4j-admin/consistency-checker.adoc | 259 --- .../ROOT/pages/tools/neo4j-admin/index.adoc | 358 ---- .../neo4j-admin/migrate-configuration.adoc | 103 - .../tools/neo4j-admin/migrate-database.adoc | 120 -- .../tools/neo4j-admin/neo4j-admin-import.adoc | 1870 ----------------- .../tools/neo4j-admin/neo4j-admin-memrec.adoc | 96 - .../tools/neo4j-admin/neo4j-admin-report.adoc | 215 -- .../neo4j-admin/neo4j-admin-store-info.adoc | 154 -- .../ROOT/pages/tools/neo4j-admin/unbind.adoc | 100 - .../tools/neo4j-admin/upload-to-aura.adoc | 185 -- .../tools/neo4j-admin/validate-config.adoc | 62 - .../pages/tutorial/neo4j-admin-import.adoc | 14 +- .../tutorial/tutorial-composite-database.adoc | 2 +- 42 files changed, 69 insertions(+), 4234 deletions(-) delete mode 100644 modules/ROOT/pages/tools/cypher-shell.adoc delete mode 100644 modules/ROOT/pages/tools/index.adoc delete mode 100644 modules/ROOT/pages/tools/neo4j-admin/consistency-checker.adoc delete mode 100644 modules/ROOT/pages/tools/neo4j-admin/index.adoc delete mode 100644 modules/ROOT/pages/tools/neo4j-admin/migrate-configuration.adoc delete mode 100644 modules/ROOT/pages/tools/neo4j-admin/migrate-database.adoc delete mode 100644 modules/ROOT/pages/tools/neo4j-admin/neo4j-admin-import.adoc delete mode 100644 modules/ROOT/pages/tools/neo4j-admin/neo4j-admin-memrec.adoc delete mode 100644 modules/ROOT/pages/tools/neo4j-admin/neo4j-admin-report.adoc delete mode 100644 modules/ROOT/pages/tools/neo4j-admin/neo4j-admin-store-info.adoc delete mode 100644 modules/ROOT/pages/tools/neo4j-admin/unbind.adoc delete mode 100644 modules/ROOT/pages/tools/neo4j-admin/upload-to-aura.adoc delete mode 100644 modules/ROOT/pages/tools/neo4j-admin/validate-config.adoc diff --git a/modules/ROOT/content-nav.adoc b/modules/ROOT/content-nav.adoc index fb5f6516f..ecf09b0f9 100644 --- a/modules/ROOT/content-nav.adoc +++ b/modules/ROOT/content-nav.adoc @@ -80,8 +80,11 @@ ** xref:configuration/ports.adoc[] ** xref:configuration/connectors.adoc[] ** xref:configuration/set-initial-password.adoc[] +** xref:configuration/neo4j-admin-memrec.adoc[] ** xref:configuration/plugins.adoc[Plugins] ** xref:configuration/dynamic-settings.adoc[] +** xref:configuration/migrate-configuration.adoc[] +** xref:configuration/validate-config.adoc[] ** xref:configuration/configuration-settings.adoc[] *** xref:configuration/configuration-settings.adoc#_checkpoint_settings[Checkpoint settings] *** xref:configuration/configuration-settings.adoc#_cloud_storage_integration_settings[Cloud storage integration settings] @@ -103,6 +106,8 @@ *** xref:configuration/configuration-settings.adoc#_transaction_settings[Transaction settings] *** xref:configuration/configuration-settings.adoc#_transaction_log_settings[Transaction log settings] +* xref:import.adoc[] + * xref:database-administration/index.adoc[] ** xref:database-administration/syntax.adoc[] ** Standard databases @@ -111,6 +116,8 @@ *** xref:database-administration/standard-databases/listing-databases.adoc[] *** xref:database-administration/standard-databases/alter-databases.adoc[] *** xref:database-administration/standard-databases/delete-databases.adoc[] +*** xref:database-administration/standard-databases/migrate-database.adoc[] +*** xref:database-administration/standard-databases/upload-to-aura.adoc[] *** xref:database-administration/standard-databases/wait-options.adoc[] *** xref:database-administration/standard-databases/configuration-parameters.adoc[] *** xref:database-administration/standard-databases/errors.adoc[] @@ -134,6 +141,7 @@ ** xref:database-internals/transaction-logs.adoc[] ** xref:database-internals/checkpointing.adoc[] ** xref:database-internals/store-formats.adoc[] +** xref:database-internals/neo4j-admin-store-info.adoc[] * xref:clustering/index.adoc[] ** xref:clustering/introduction.adoc[] @@ -157,6 +165,7 @@ ** xref:clustering/server-syntax.adoc[] ** xref:clustering/clustering-advanced/index.adoc[] *** xref:clustering/clustering-advanced/default-database.adoc[] +*** xref:clustering/clustering-advanced/unbind.adoc[] *** xref:clustering/clustering-advanced/multi-data-center-routing.adoc[] *** xref:clustering/clustering-advanced/reconciler.adoc[] ** xref:clustering/glossary.adoc[] @@ -167,6 +176,7 @@ ** xref:backup-restore/online-backup.adoc[] ** xref:backup-restore/aggregate.adoc[] ** xref:backup-restore/inspect.adoc[] +** xref:backup-restore/consistency-checker.adoc[] ** xref:backup-restore/restore-backup.adoc[] ** xref:backup-restore/offline-backup.adoc[] ** xref:backup-restore/restore-dump.adoc[] @@ -220,23 +230,13 @@ ** xref:monitoring/query-management.adoc[] ** xref:monitoring/connection-management.adoc[] ** xref:monitoring/background-jobs.adoc[] +** xref:monitoring/neo4j-admin-report.adoc[] // ** xref:monitoring/cluster/index.adoc[] // *** xref:monitoring/cluster/procedures.adoc[] // *** xref:monitoring/cluster/http-endpoints.adoc[] -* xref:tools/index.adoc[] -** xref:tools/neo4j-admin/index.adoc[] -*** xref:tools/neo4j-admin/consistency-checker.adoc[] -*** xref:tools/neo4j-admin/neo4j-admin-report.adoc[] -*** xref:tools/neo4j-admin/neo4j-admin-store-info.adoc[] -*** xref:tools/neo4j-admin/neo4j-admin-memrec.adoc[] -*** xref:tools/neo4j-admin/neo4j-admin-import.adoc[] -*** xref:tools/neo4j-admin/unbind.adoc[] -*** xref:tools/neo4j-admin/upload-to-aura.adoc[] -*** xref:tools/neo4j-admin/migrate-database.adoc[] -*** xref:tools/neo4j-admin/migrate-configuration.adoc[] -*** xref:tools/neo4j-admin/validate-config.adoc[] -** xref:tools/cypher-shell.adoc[] +* xref:neo4j-admin-neo4j-cli.adoc[] +* xref:cypher-shell.adoc[] * xref:procedures.adoc[] diff --git a/modules/ROOT/pages/authentication-authorization/password-and-user-recovery.adoc b/modules/ROOT/pages/authentication-authorization/password-and-user-recovery.adoc index 16f2b7f6b..8f28a12f6 100644 --- a/modules/ROOT/pages/authentication-authorization/password-and-user-recovery.adoc +++ b/modules/ROOT/pages/authentication-authorization/password-and-user-recovery.adoc @@ -36,7 +36,7 @@ server.default_listen_address=127.0.0.1 + [NOTE] ==== -Ensure, you have blocked all network connections for any individual services configured to listen to `listen_addresses`. +Ensure, you have blocked all network connections for any individual services configured to listen to `listen_addresses`. ==== + . Start Neo4j: @@ -86,7 +86,7 @@ bin/neo4j start [[password-recovery-for-admin]] == Recover a lost password -You can use a client such as xref:tools/cypher-shell.adoc[Cypher Shell] or the Neo4j Browser to connect to the xref:database-administration/index.adoc#manage-databases-system[`system`] database and set a new password for the admin user. +You can use a client such as xref:cypher-shell.adoc[][Cypher Shell] or the Neo4j Browser to connect to the xref:database-administration/index.adoc#manage-databases-system[`system`] database and set a new password for the admin user. [NOTE] ==== @@ -124,7 +124,7 @@ ALTER USER neo4j SET PASSWORD 'mynewpassword' [[recover-unassigned-admin-role]] == Recover an unassigned admin role -You can use a client such as xref:tools/cypher-shell.adoc[Cypher Shell] or the Neo4j Browser to connect to the xref:database-administration/index.adoc#manage-databases-system[`system`] database and grant the admin user role to an existing user. +You can use a client such as xref:cypher-shell.adoc[][Cypher Shell] or the Neo4j Browser to connect to the xref:database-administration/index.adoc#manage-databases-system[`system`] database and grant the admin user role to an existing user. [NOTE] ==== @@ -162,7 +162,7 @@ GRANT ROLE admin TO neo4j [[recover-admin-role]] == Recover the admin role -If you have removed the admin role from your system entirely, you can use a client such as xref:tools/cypher-shell.adoc[Cypher Shell] or the Neo4j Browser to connect to the xref:database-administration/index.adoc#manage-databases-system[`system`] database and recreate the role with its original capabilities. +If you have removed the admin role from your system entirely, you can use a client such as xref:cypher-shell.adoc[][Cypher Shell] or the Neo4j Browser to connect to the xref:database-administration/index.adoc#manage-databases-system[`system`] database and recreate the role with its original capabilities. [NOTE] ==== diff --git a/modules/ROOT/pages/backup-restore/aggregate.adoc b/modules/ROOT/pages/backup-restore/aggregate.adoc index 0aaeb0a31..17fae8687 100644 --- a/modules/ROOT/pages/backup-restore/aggregate.adoc +++ b/modules/ROOT/pages/backup-restore/aggregate.adoc @@ -67,7 +67,7 @@ Aggregates a chain of backup artifacts into a single artifact. | Description | Default -|--additional-config=footnote:[See xref:tools/neo4j-admin/index.adoc#_configuration[Tools -> Configuration] for details.] +|--additional-config=footnote:[See xref:neo4j-admin-neo4j-cli.adoc[]#_configuration[Tools -> Configuration] for details.] |Configuration file with additional configuration. | diff --git a/modules/ROOT/pages/backup-restore/copy-database.adoc b/modules/ROOT/pages/backup-restore/copy-database.adoc index 5f6e1a2a6..1476ed8bf 100644 --- a/modules/ROOT/pages/backup-restore/copy-database.adoc +++ b/modules/ROOT/pages/backup-restore/copy-database.adoc @@ -81,7 +81,7 @@ The `neo4j-admin database copy` command has the following options: | Description | Default -|--additional-config=footnote:[See xref:tools/neo4j-admin/index.adoc#_configuration[Tools -> Configuration] for details.] +|--additional-config=footnote:[See xref:neo4j-admin-neo4j-cli.adoc[]#_configuration[Tools -> Configuration] for details.] |Configuration file with additional configuration. | diff --git a/modules/ROOT/pages/backup-restore/index.adoc b/modules/ROOT/pages/backup-restore/index.adoc index 9be0cbdd2..87470ae88 100644 --- a/modules/ROOT/pages/backup-restore/index.adoc +++ b/modules/ROOT/pages/backup-restore/index.adoc @@ -9,6 +9,7 @@ This chapter describes the following: * xref:backup-restore/online-backup.adoc[Back up an online database] -- How to back up an online database. * xref:backup-restore/aggregate.adoc[Aggregate a database backup chain] - How to aggregate a backup chain into a single backup. * xref:backup-restore/inspect.adoc[Inspect the metadata of a database backup file] -- How to inspect the metadata of a database backup file. +* xref:backup-restore/consistency-checker.adoc[Check database consistency] -- How to check the consistency of a database, backup, or a dump. * xref:backup-restore/restore-backup.adoc[Restore a database backup] -- How to restore a database backup in a live Neo4j deployment. * xref:backup-restore/offline-backup.adoc[Back up an offline database] -- How to back up an offline database. * xref:backup-restore/restore-dump.adoc[Restore a database dump] -- How to restore a database dump in a live Neo4j deployment. diff --git a/modules/ROOT/pages/backup-restore/inspect.adoc b/modules/ROOT/pages/backup-restore/inspect.adoc index 0d11e200c..08c60578f 100644 --- a/modules/ROOT/pages/backup-restore/inspect.adoc +++ b/modules/ROOT/pages/backup-restore/inspect.adoc @@ -66,7 +66,7 @@ The `` parameter can also inspect backups stored in AWS S3 buckets, | Description | Default -|--additional-config=footnote:[See xref:tools/neo4j-admin/index.adoc#_configuration[Tools -> Configuration] for details.] +|--additional-config=footnote:[See xref:neo4j-admin-neo4j-cli.adoc[]#_configuration[Tools -> Configuration] for details.] |Configuration file with additional configuration. | diff --git a/modules/ROOT/pages/backup-restore/offline-backup.adoc b/modules/ROOT/pages/backup-restore/offline-backup.adoc index ce8256e00..4201cd154 100644 --- a/modules/ROOT/pages/backup-restore/offline-backup.adoc +++ b/modules/ROOT/pages/backup-restore/offline-backup.adoc @@ -65,7 +65,7 @@ The `neo4j-admin database dump` command has the following options: | Description | Default -|--additional-config=footnote:[See xref:tools/neo4j-admin/index.adoc#_configuration[Tools -> Configuration] for details.] +|--additional-config=footnote:[See xref:neo4j-admin-neo4j-cli.adoc[]#_configuration[Tools -> Configuration] for details.] |Configuration file with additional configuration. | diff --git a/modules/ROOT/pages/backup-restore/online-backup.adoc b/modules/ROOT/pages/backup-restore/online-backup.adoc index 3aa04ca5d..6d9643e97 100644 --- a/modules/ROOT/pages/backup-restore/online-backup.adoc +++ b/modules/ROOT/pages/backup-restore/online-backup.adoc @@ -109,7 +109,7 @@ If is "*", `neo4j-admin` will attempt to back up all databases of the | Description | Default -|--additional-config=footnote:[See xref:tools/neo4j-admin/index.adoc#_configuration[Tools -> Configuration] for details.] +|--additional-config=footnote:[See xref:neo4j-admin-neo4j-cli.adoc[]#_configuration[Tools -> Configuration] for details.] |Configuration file with additional configuration. | diff --git a/modules/ROOT/pages/backup-restore/planning.adoc b/modules/ROOT/pages/backup-restore/planning.adoc index b2e7e529f..42d1e38ee 100644 --- a/modules/ROOT/pages/backup-restore/planning.adoc +++ b/modules/ROOT/pages/backup-restore/planning.adoc @@ -51,7 +51,7 @@ This ensures that if for some reason your Neo4j DBMS crashes, you will be able t == Backup and restore options Neo4j supports backing up and restoring both online and offline databases. -It uses xref:tools/neo4j-admin/index.adoc[Neo4j Admin tool] commands, which can be run from a live, as well as from an offline Neo4j DBMS. +It uses xref:neo4j-admin-neo4j-cli.adoc[][Neo4j Admin tool] commands, which can be run from a live, as well as from an offline Neo4j DBMS. All `neo4j-admin` commands must be invoked as the `neo4j` user to ensure the appropriate file permissions. * `neo4j-admin database backup/restore` (Enterprise only) -– used for performing online backup (xref:backup-restore/modes.adoc#full-backup[full] and xref:backup-restore/modes.adoc#differential-backup[differential]) and restore operations. diff --git a/modules/ROOT/pages/backup-restore/restore-backup.adoc b/modules/ROOT/pages/backup-restore/restore-backup.adoc index 8606948dd..9bfaf2041 100644 --- a/modules/ROOT/pages/backup-restore/restore-backup.adoc +++ b/modules/ROOT/pages/backup-restore/restore-backup.adoc @@ -66,7 +66,7 @@ neo4j-admin database restore [-h] [--expand-commands] [--verbose] [--overwrite-d | Description | Default -|--additional-config=footnote:[See xref:tools/neo4j-admin/index.adoc#_configuration[Tools -> Configuration] for details.] +|--additional-config=footnote:[See xref:neo4j-admin-neo4j-cli.adoc[]#_configuration[Tools -> Configuration] for details.] |Configuration file with additional configuration. | @@ -100,7 +100,7 @@ The restore recovers transaction logs up to, but not including, the transaction The restore recovers transactions that were committed before the provided timestamp. | -| --source-database[=source-database-name] +| --source-database[=source-database-name] |label:new[Introduced in 2025.02] A source database name. If the `--from-path` points to a folder containing backups for multiple databases, you must specify the database name to filter the artifacts. | @@ -299,7 +299,7 @@ For more information, see xref:clustering/databases.adoc#cluster-seed[Designated If you have backed up a database with the option `--include-metadata`, you can manually restore the users and roles metadata. -From the __ directory, you run the Cypher script _data/scripts/databasename/restore_metadata.cypher_, which the `neo4j-admin database restore` command outputs, using xref:tools/cypher-shell.adoc[Cypher Shell]: +From the __ directory, you run the Cypher script _data/scripts/databasename/restore_metadata.cypher_, which the `neo4j-admin database restore` command outputs, using xref:cypher-shell.adoc[][Cypher Shell]: *Using `cat` (UNIX)* [source, shell, role=nocopy noplay] diff --git a/modules/ROOT/pages/backup-restore/restore-dump.adoc b/modules/ROOT/pages/backup-restore/restore-dump.adoc index 974f44fb1..139db5978 100644 --- a/modules/ROOT/pages/backup-restore/restore-dump.adoc +++ b/modules/ROOT/pages/backup-restore/restore-dump.adoc @@ -58,7 +58,7 @@ If `--info` is specified, then the database is not loaded, but information (i.e. | Description | Default -|--additional-config=footnote:[See xref:tools/neo4j-admin/index.adoc#_configuration[Tools -> Configuration] for details.] +|--additional-config=footnote:[See xref:neo4j-admin-neo4j-cli.adoc[]#_configuration[Tools -> Configuration] for details.] |Configuration file with additional configuration. | diff --git a/modules/ROOT/pages/clustering/clustering-advanced/index.adoc b/modules/ROOT/pages/clustering/clustering-advanced/index.adoc index 3f71529cf..16d2f8358 100644 --- a/modules/ROOT/pages/clustering/clustering-advanced/index.adoc +++ b/modules/ROOT/pages/clustering/clustering-advanced/index.adoc @@ -7,6 +7,7 @@ This section includes information about advanced deployments of a Neo4j Cluster. * xref:clustering/clustering-advanced/default-database.adoc[Default database in a cluster] -- Details of the creation of the default database in a cluster. +* xref:clustering/clustering-advanced/unbind.adoc[Unbind a server] -- How to remove and archive the cluster state of a cluster server so that it can rebind to a cluster. * xref:clustering/clustering-advanced/multi-data-center-routing.adoc[Multi-data center routing] -- Information about routing in multi-data center deployments. * xref:clustering/clustering-advanced/reconciler.adoc[Reconciler] -- Details about the way database management operations are processed. diff --git a/modules/ROOT/pages/clustering/disaster-recovery.adoc b/modules/ROOT/pages/clustering/disaster-recovery.adoc index 98f846c57..754e2514c 100644 --- a/modules/ROOT/pages/clustering/disaster-recovery.adoc +++ b/modules/ROOT/pages/clustering/disaster-recovery.adoc @@ -122,7 +122,7 @@ It is important to get a `system` database that is as up-to-date as possible, so [NOTE] ===== This section of the disaster recovery guide uses `neo4j-admin` commands. -For more information about the used commands, see xref:tools/neo4j-admin/index.adoc#neo4j-admin-commands[neo4j-admin commands]. +For more information about the used commands, see xref:neo4j-admin-neo4j-cli.adoc[]#neo4j-admin-commands[neo4j-admin commands]. ===== . Shut down the Neo4j process on all servers. diff --git a/modules/ROOT/pages/clustering/index.adoc b/modules/ROOT/pages/clustering/index.adoc index a3cde8632..2f64872ad 100644 --- a/modules/ROOT/pages/clustering/index.adoc +++ b/modules/ROOT/pages/clustering/index.adoc @@ -25,6 +25,7 @@ This chapter describes the following: * xref:clustering/server-syntax.adoc[Server commands reference] -- Reference of Cypher administrative commands to add and manage servers. * xref:clustering/clustering-advanced/index.adoc[Advanced clustering] -- Some more advanced features of Neo4j clusters. ** xref:clustering/clustering-advanced/default-database.adoc[Default database in a cluster] -- The initial default database created when the DBMS starts for the first time. +** xref:clustering/clustering-advanced/unbind.adoc[Unbind a server] -- How to remove and archive the cluster state of a cluster server so that it can rebind to a cluster. ** xref:clustering/clustering-advanced/multi-data-center-routing.adoc[Multi-data center routing] -- Clusters on mutli-data centers. ** xref:clustering/clustering-advanced/reconciler.adoc[Reconciler] -- An internal component that observes the requested state of a server and makes changes to the server to match that state. * xref:clustering/glossary.adoc[Clustering glossary] -- A glossary of terms related to the Neo4j clustering. diff --git a/modules/ROOT/pages/configuration/command-expansion.adoc b/modules/ROOT/pages/configuration/command-expansion.adoc index d6b4c69ca..88cacc581 100644 --- a/modules/ROOT/pages/configuration/command-expansion.adoc +++ b/modules/ROOT/pages/configuration/command-expansion.adoc @@ -110,4 +110,4 @@ In this case, the execution stops and the server does not start. * Errors for incorrect values -- The returned value is not the one expected for the setting. In this case, the server does not start. -For more information, see xref:tools/neo4j-admin/index.adoc#neo4j-admin-exit-codes[Exit codes]. +For more information, see xref:neo4j-admin-neo4j-cli.adoc[]#neo4j-admin-exit-codes[Exit codes]. diff --git a/modules/ROOT/pages/configuration/file-locations.adoc b/modules/ROOT/pages/configuration/file-locations.adoc index 2a5296496..d90f82b0a 100644 --- a/modules/ROOT/pages/configuration/file-locations.adoc +++ b/modules/ROOT/pages/configuration/file-locations.adoc @@ -24,7 +24,7 @@ For the Neo4j's uses of the Java Native Access (JNA) library, set `server.jvm.ad [[neo4j-bin]] === Bin -The _bin_ directory contains the Neo4j running script and built-in tools, such as xref:tools/cypher-shell.adoc[Cypher Shell] and xref:tools/neo4j-admin/index.adoc[Neo4j Admin]. +The _bin_ directory contains the Neo4j running script and built-in tools, such as xref:cypher-shell.adoc[][Cypher Shell] and xref:neo4j-admin-neo4j-cli.adoc[][Neo4j Admin]. File permissions:: Read only and execute. diff --git a/modules/ROOT/pages/configuration/index.adoc b/modules/ROOT/pages/configuration/index.adoc index da8520f73..3cd4c696b 100644 --- a/modules/ROOT/pages/configuration/index.adoc +++ b/modules/ROOT/pages/configuration/index.adoc @@ -10,8 +10,11 @@ The topics described are: * xref:configuration/ports.adoc[Ports] -- An overview of the ports relevant to a Neo4j installation. * xref:configuration/connectors.adoc[Configure network connectors] -- How to configure network connectors for Neo4j. * xref:configuration/set-initial-password.adoc[Set initial password] -- How to set an initial password. -* xref:configuration/plugins.adoc[Configure Neo4j plugins] -- How to load plugins to a Neo4j deployment. +* xref:configuration/neo4j-admin-memrec.adoc[Get initial memory recommendations] -- How to get initial memory recommendations for Neo4j. +* xref:configuration/plugins.adoc[Configure Neo4j plugins] -- How to load plugins into a Neo4j deployment. * xref:configuration/dynamic-settings.adoc[Update dynamic settings] -- How to configure certain Neo4j parameters while Neo4j is running. +* xref:configuration/migrate-configuration.adoc[Migrate configurations] -- How to migrate configuration settings from a previous version of Neo4j to a new version. +* xref:configuration/validate-config.adoc[Validate configurations] -- How to validate Neo4j and Log4j configurations. * xref:configuration/configuration-settings.adoc[Configuration settings] -- A complete reference of all configuration settings. For a complete reference of Neo4j configuration settings, see xref:configuration/configuration-settings.adoc[All configuration settings]. diff --git a/modules/ROOT/pages/database-administration/queries.adoc b/modules/ROOT/pages/database-administration/queries.adoc index b1fbf7cda..878bf236e 100644 --- a/modules/ROOT/pages/database-administration/queries.adoc +++ b/modules/ROOT/pages/database-administration/queries.adoc @@ -4,7 +4,7 @@ [NOTE] ==== -All commands and example queries in this section are run in xref:tools/cypher-shell.adoc[the Neo4j Cypher Shell command-line interface (CLI)]. +All commands and example queries in this section are run in xref:cypher-shell.adoc[][the Neo4j Cypher Shell command-line interface (CLI)]. Note that the `cypher-shell` queries are not case-sensitive, but must end with a semicolon. ==== diff --git a/modules/ROOT/pages/database-internals/index.adoc b/modules/ROOT/pages/database-internals/index.adoc index 1655c7102..69581e104 100644 --- a/modules/ROOT/pages/database-internals/index.adoc +++ b/modules/ROOT/pages/database-internals/index.adoc @@ -25,6 +25,8 @@ The following sections describe the transactional behavior in detail and how to * xref:database-internals/transaction-logs.adoc[] * xref:database-internals/checkpointing.adoc[] * xref:database-internals/store-formats.adoc[] +* xref:database-internals/neo4j-admin-store-info.adoc[] + [NOTE] ==== diff --git a/modules/ROOT/pages/database-internals/store-formats.adoc b/modules/ROOT/pages/database-internals/store-formats.adoc index cc1adcea0..001a5bf20 100644 --- a/modules/ROOT/pages/database-internals/store-formats.adoc +++ b/modules/ROOT/pages/database-internals/store-formats.adoc @@ -94,7 +94,7 @@ You can either set the store format when creating a new database or change the s `block` is the default format for all newly-created databases as long as they do not have the xref:configuration/configuration-settings.adoc#config_db.format[`db.format`] setting specified. + If you want to change it, you can set a new value for the xref:configuration/configuration-settings.adoc#config_db.format[`db.format`] configuration in the _neo4j.conf_ file. + -You can also create a new database on a specific store format by passing the new format as an argument to the command creating the database, for example, xref:tools/neo4j-admin/neo4j-admin-import.adoc#import-tool-full[`neo4j-admin database import full`] or xref:backup-restore/copy-database.adoc[`neo4j-admin database copy`] commands, or by using `storeFormat:` option in the Cypher command `CREATE DATABASE`. +You can also create a new database on a specific store format by passing the new format as an argument to the command creating the database, for example, xref:import.adoc#import-tool-full[`neo4j-admin database import full`] or xref:backup-restore/copy-database.adoc[`neo4j-admin database copy`] commands, or by using `storeFormat:` option in the Cypher command `CREATE DATABASE`. The following examples show how to create a new database on the `block` store format. However, the same applies to other formats. @@ -160,7 +160,7 @@ The following steps assume that you want to migrate the database called `mydb` t . Stop the database using the Cypher command `STOP DATABASE mydb`. . Change the store format of the stopped database using *one* of the following options: -* Migrate an existing database using xref:tools/neo4j-admin/migrate-database.adoc[`neo4j-admin database migrate`] command. +* Migrate an existing database using xref:database-administration/standard-databases/migrate-database.adoc[`neo4j-admin database migrate`] command. + [IMPORTANT] ==== @@ -280,7 +280,7 @@ SHOW DATABASES YIELD name, store ---- Additionally, you can use the `neo4j-admin database info` command to get detailed information about the store format of a database. -For details, see xref:tools/neo4j-admin/neo4j-admin-store-info.adoc[Display store information]. +For details, see xref:database-internals/neo4j-admin-store-info.adoc[Display store information]. [[store-formats-entity-limits]] == Store formats and entity limits diff --git a/modules/ROOT/pages/docker/operations.adoc b/modules/ROOT/pages/docker/operations.adoc index 0bb51a825..cbed1a445 100644 --- a/modules/ROOT/pages/docker/operations.adoc +++ b/modules/ROOT/pages/docker/operations.adoc @@ -7,7 +7,7 @@ You can use the Neo4j tools when running Neo4j in a Docker container. [[docker-neo4j-admin]] == Use Neo4j Admin -The xref:tools/neo4j-admin/index.adoc[Neo4j Admin tool] can be run locally within a container using the following command: +The xref:neo4j-admin-neo4j-cli.adoc[][Neo4j Admin tool] can be run locally within a container using the following command: [source, shell] ---- @@ -16,12 +16,12 @@ docker exec --interactive --tty neo4j-admin neo4j-admin database import incremental ---- -For more information about the commands' syntax and options, see xref:tools/neo4j-admin/neo4j-admin-import.adoc#import-tool-full[Full import] and xref:tools/neo4j-admin/neo4j-admin-import.adoc#import-tool-incremental[Incremental import]. +For more information about the commands' syntax and options, see xref:import.adoc#import-tool-full[Full import] and xref:import.adoc#import-tool-incremental[Incremental import]. [discrete] [[docker-import-prerequisites]] === Prerequisites * Verify that you have created the folders that you want to mount as volumes to the Neo4j docker container. -* Verify that the CSV files that you want to load into Neo4j are formatted as per xref:tools/neo4j-admin/neo4j-admin-import.adoc#import-tool-header-format[CSV header format]. +* Verify that the CSV files that you want to load into Neo4j are formatted as per xref:import.adoc#import-tool-header-format[CSV header format]. * Verify that you have added the CSV files to the folder that will be mounted to _/import_ in your container. [discrete] @@ -67,7 +67,7 @@ neo4j-admin database import full --nodes=Movies=/import/movies_header.csv,/impor [[docker-neo4j-memrec]] == Use Neo4j Admin for memory recommendations -The xref:tools/neo4j-admin/neo4j-admin-memrec.adoc[neo4j-admin server memory-recommendation] command with the argument `--docker` outputs environmental variables that can be passed to a Neo4j docker container. +The xref:configuration/neo4j-admin-memrec.adoc[][neo4j-admin server memory-recommendation] command with the argument `--docker` outputs environmental variables that can be passed to a Neo4j docker container. The following example shows how `neo4j-admin server memory-recommendation --docker` provides a memory recommendation in a docker-friendly format. .Invoke `neo4j-admin server memory-recommendation --docker` @@ -96,7 +96,7 @@ NEO4J_server_jvm_additional='-XX:+ExitOnOutOfMemoryError' [[docker-neo4j-admin-report]] == Use Neo4j Admin report -The xref:tools/neo4j-admin/neo4j-admin-report.adoc[Neo4j Admin report tool] generates a report of the status of a running Neo4j database. + +The xref:monitoring/neo4j-admin-report.adoc[Neo4j Admin report tool] generates a report of the status of a running Neo4j database. + In a containerized environment, its command `neo4j-admin server report` must be invoked using the script `neo4j-admin-report`. This ensures that the reporter is running with all the necessary file permissions required to analyze the running Neo4j processes. This script takes all the arguments of the `neo4j-admin server report` command. @@ -142,14 +142,14 @@ The `$HOME/neo4j/reports` folder should now contain a zip file of reports. [[docker-cypher-shell]] == Use Cypher Shell -The xref:tools/cypher-shell.adoc[Neo4j Cypher Shell tool] can be run locally within a container using the following command: +The xref:cypher-shell.adoc[][Neo4j Cypher Shell tool] can be run locally within a container using the following command: [source, shell] ---- docker exec --interactive --tty cypher-shell ---- -For more information about the `cypher-shell` syntax and options, see xref:tools/cypher-shell.adoc#cypher-shell-syntax[Syntax]. +For more information about the `cypher-shell` syntax and options, see xref:cypher-shell.adoc[]#cypher-shell-syntax[Syntax]. [[docker-cypher-shell-example]] === Retrieve data from a database in a Neo4j Docker container diff --git a/modules/ROOT/pages/installation/linux/debian.adoc b/modules/ROOT/pages/installation/linux/debian.adoc index 48b5d464f..8fe8f27a7 100644 --- a/modules/ROOT/pages/installation/linux/debian.adoc +++ b/modules/ROOT/pages/installation/linux/debian.adoc @@ -140,7 +140,7 @@ If you cannot reach `https://debian.neo4j.com`, perhaps due to a firewall, you n [NOTE] ==== -It is important to note that using this method will mean that the offline machine will not receive the dependencies that are normally downloaded and installed automatically when using `apt` for installing Neo4j; xref:tools/cypher-shell.adoc[Cypher Shell] and Java (if not installed already): +It is important to note that using this method will mean that the offline machine will not receive the dependencies that are normally downloaded and installed automatically when using `apt` for installing Neo4j; xref:cypher-shell.adoc[][Cypher Shell] and Java (if not installed already): * The Cypher Shell package can be downloaded from {neo4j-download-center-uri}[Neo4j Deployment Center]. * For information on supported versions of Java, see xref:installation/requirements.adoc[System requirements]. diff --git a/modules/ROOT/pages/installation/linux/rpm.adoc b/modules/ROOT/pages/installation/linux/rpm.adoc index c80185823..26a9cea2a 100644 --- a/modules/ROOT/pages/installation/linux/rpm.adoc +++ b/modules/ROOT/pages/installation/linux/rpm.adoc @@ -139,7 +139,7 @@ If you cannot reach `\https://yum.neo4j.com/stable/{neo4j-version}` to install N [NOTE] ==== -It is important to note that using this method means that the offline machine cannot receive the dependencies that are normally downloaded and installed automatically when using `yum` for installing Neo4j, xref:tools/cypher-shell.adoc[Neo4j Cypher Shell], and Java. +It is important to note that using this method means that the offline machine cannot receive the dependencies that are normally downloaded and installed automatically when using `yum` for installing Neo4j, xref:cypher-shell.adoc[][Neo4j Cypher Shell], and Java. ==== . Download the Neo4j and Cypher Shell RPM installers from https://neo4j.com/deployment-center/[Deployment Center] or run the following to obtain the required packages: diff --git a/modules/ROOT/pages/introduction.adoc b/modules/ROOT/pages/introduction.adoc index 1e4db2305..a24dbb8c2 100644 --- a/modules/ROOT/pages/introduction.adoc +++ b/modules/ROOT/pages/introduction.adoc @@ -130,7 +130,7 @@ a| link:https://neo4j.com/docs/cdc/current/[Change Data Capture (CDC)] | | -| xref:tools/cypher-shell.adoc[Cypher Shell] +| xref:cypher-shell.adoc[][Cypher Shell] | {check-mark} | {check-mark} @@ -222,11 +222,11 @@ a| APOC 450+ link:https://neo4j.com/docs/apoc/5/[Core Procedures and Functions] | | -| xref:tools/neo4j-admin/neo4j-admin-import.adoc#import-tool-full[Offline import] +| xref:import.adoc#import-tool-full[Offline import] | {check-mark} | {check-mark} -| xref:tools/neo4j-admin/neo4j-admin-import.adoc#import-tool-incremental[Offline incremental import] +| xref:import.adoc#import-tool-incremental[Offline incremental import] | | {check-mark} diff --git a/modules/ROOT/pages/kubernetes/import-data.adoc b/modules/ROOT/pages/kubernetes/import-data.adoc index bd99a1933..370c95e67 100644 --- a/modules/ROOT/pages/kubernetes/import-data.adoc +++ b/modules/ROOT/pages/kubernetes/import-data.adoc @@ -14,7 +14,7 @@ You place all the files that you want to import in this volume. To import data from CSV files into Neo4j, use the command `neo4j-admin database import` or the Cypher query `LOAD CSV`. -* The xref:tools/neo4j-admin/neo4j-admin-import.adoc[`neo4j-admin database import`] command can be used to do batch imports of large amounts of data into a previously unused database and can only be performed once per database. +* The xref:import.adoc[`neo4j-admin database import`] command can be used to do batch imports of large amounts of data into a previously unused database and can only be performed once per database. * `LOAD CSV` Cypher statement can be used to import small to medium-sized CSV files into an existing database. `LOAD CSV` can be run as many times as needed and does not require an empty database. For a simple example, see link:https://neo4j.com/docs/getting-started/current/cypher-intro/load-csv[Getting Started Guide -> Import data]. diff --git a/modules/ROOT/pages/monitoring/index.adoc b/modules/ROOT/pages/monitoring/index.adoc index 68f746b8f..5aee62526 100644 --- a/modules/ROOT/pages/monitoring/index.adoc +++ b/modules/ROOT/pages/monitoring/index.adoc @@ -28,6 +28,5 @@ This chapter describes the following: * xref:monitoring/background-jobs.adoc[Manage background jobs] ** xref:monitoring/background-jobs.adoc#background-jobs-active[Listing active background jobs] ** xref:monitoring/background-jobs.adoc#background-jobs-failed[Listing failed job executions] -* xref:clustering/monitoring/show-databases-monitoring.adoc[Monitor the state of individual databases] - +* xref:monitoring/neo4j-admin-report.adoc[Generate a report about the system] diff --git a/modules/ROOT/pages/performance/memory-configuration.adoc b/modules/ROOT/pages/performance/memory-configuration.adoc index 87f268d92..126ebe5c0 100644 --- a/modules/ROOT/pages/performance/memory-configuration.adoc +++ b/modules/ROOT/pages/performance/memory-configuration.adoc @@ -93,13 +93,13 @@ Otherwise, Neo4j computes some heuristic values at startup based on the availabl [discrete] [[memory-configuration-initial]] Initial memory recommendation:: -Use the `xref:tools/neo4j-admin/neo4j-admin-memrec.adoc[neo4j-admin server memory-recommendation]` command to get an initial recommendation for how to distribute a certain amount of memory. +Use the `xref:configuration/neo4j-admin-memrec.adoc[][neo4j-admin server memory-recommendation]` command to get an initial recommendation for how to distribute a certain amount of memory. The values may need to be adjusted to cater for each specific use case. [discrete] [[memory-configuration-database]] Inspect the memory settings of all databases in a DBMS:: -The `xref:tools/neo4j-admin/neo4j-admin-memrec.adoc[neo4j-admin server memory-recommendation]` command is useful for inspecting the current distribution of data and indexes. +The `xref:configuration/neo4j-admin-memrec.adoc[][neo4j-admin server memory-recommendation]` command is useful for inspecting the current distribution of data and indexes. + .Use `neo4j-admin server memory-recommendation` to inspect the memory settings of all your databases ==== diff --git a/modules/ROOT/pages/tools/cypher-shell.adoc b/modules/ROOT/pages/tools/cypher-shell.adoc deleted file mode 100644 index 36936d24c..000000000 --- a/modules/ROOT/pages/tools/cypher-shell.adoc +++ /dev/null @@ -1,626 +0,0 @@ -:description: Describes Neo4j Cypher Shell command-line interface (CLI) and how to use it. -[[cypher-shell]] -= Cypher Shell - -[[cypher-shell-about]] -== About Cypher Shell CLI - -Cypher Shell is a command-line tool used to run queries and perform administrative tasks against a Neo4j instance. -By default, the shell is interactive, but you can also use it for scripting by passing Cypher directly on the command line or by piping a file with Cypher statements (requires PowerShell on Windows). -It communicates via the Bolt protocol. - -Cypher Shell is located in the `bin` directory if installed as part of the product. -Alternatively, you can download it from link:https://neo4j.com/deployment-center/?cypher-shell[Neo4j Deployment Center] and install it separately. - -[[cypher-shell-syntax]] -== Syntax - -The syntax for running Cypher Shell is: - ----- - cypher-shell [-h] [-a ADDRESS] - [-u USERNAME] [--impersonate IMPERSONATE] - [-p PASSWORD] [--encryption {true,false,default}] - [-d DATABASE] [--access-mode {read,write}] - [--format {auto,verbose,plain}] - [-P PARAM] [--non-interactive] [--sample-rows SAMPLE-ROWS] - [--wrap {true,false}] [-v] [--driver-version] - [-f FILE] [--change-password] [--log [LOG-FILE]] - [--history HISTORY-BEHAVIOUR] - [--notifications] [--fail-fast | --fail-at-end] - [--idle-timeout IDLE-TIMEOUT] - [cypher] ----- - -== Positional arguments - -[options="header", cols="1m,3a"] -|=== -| Option -| Description - -|cypher -|An optional string of Cypher to execute and then exit. -|=== - -== Named arguments - -[options="header", cols="5m,6a,4m"] -|=== -| Option -| Description -| Default - -|-h, --help -|Show this help message and exit. -| - -|--fail-fast -| Exit and report failure on the first error when reading from a file (this is the default behavior). -| - -| --fail-at-end -| Exit and report failures at the end of the input when reading from a file. -| - -| --enable-autocompletions -| Whether to enable Cypher autocompletions inside the CLI, which are disabled by default. -| - -|--format {auto,verbose,plain} -|Desired output format. Displays the results in tabular format if you use the shell interactively and with minimal formatting if you use it for scripting. + -`verbose` displays results in a tabular format and prints statistics. + -`plain` displays data with minimal formatting. -|auto - -|-P PARAM, --param PARAM -|Add a parameter to this session. Example: `-P '{a: 1}'`, `-P '{a: 1, b: duration({seconds: 1})}'`, or using arrow syntax `-P 'a => 1'`. This argument can be specified multiple times. -|[] - -|--non-interactive -|Force non-interactive mode. Only useful when auto-detection fails (like on Windows). -|false - -|--sample-rows SAMPLE-ROWS -|Number of rows sampled to compute table widths (only for format=VERBOSE) -|1000 - -|--wrap {true,false} -|Wrap table column values if the column is too narrow (only for format=VERBOSE). -|true - -|-v, --version -|Print Cypher Shell version and exit. -|false - -|--driver-version -|Print Neo4j Driver version and exit. -|false - -|-f FILE, --file FILE -|Pass a file with Cypher statements to be executed. -After executing all statements, Cypher Shell shuts down. -| - -|--change-password -|Change the neo4j user password and exit. -|false - -|--log [LOG-FILE] -|Enable logging to the specified file, or standard error if the file is omitted. -| - -|--history [HISTORY-BEHAVIOUR] -|File path of query and command history file or `in-memory` for in-memory history. -Defaults to /.neo4j/.cypher_shell_history. -It can also be set using the environmental variable NEO4J_CYPHER_SHELL_HISTORY. -| - -|--notifications -|Enable query notifications in interactive mode. -|false - -|--idle-timeout IDLE-TIMEOUT -|Closes the application after the specified amount of idle time in interactive mode. You can specify the duration using the format `hms`, for example `1h` (1 hour), `1h30m` (1 hour 30 minutes), or `30m` (30 minutes). -|disable -|=== - -== Connection arguments - -[options="header", cols="5m,6a,4m"] -|=== -| Option -| Description -| Default - -| -a ADDRESS, --address ADDRESS, --uri ADDRESS -| Address and port to connect to. Defaults to neo4j://localhost:7687. -Can also be specified using the environment variable `NEO4J_ADDRESS` or `NEO4J_URI`. -|neo4j://localhost:7687 - -| -u USERNAME, --username USERNAME -| Username to connect as. Can also be specified using the environment variable NEO4J_USERNAME. -| - -| --impersonate IMPERSONATE -| User to impersonate. -| - -| -p PASSWORD, --password PASSWORD -| Password to connect with. Can also be specified using the environment variable NEO4J_PASSWORD. -| - -| --encryption {true,false,default} -| Whether the connection to Neo4j should be encrypted. This must be consistent with Neo4j's configuration. If choosing `default`, the encryption setting is deduced from the specified address. For example, the `neo4j+ssc` protocol uses encryption. -| default - -| -d DATABASE --database DATABASE -| Database to connect to. Can also be specified using the environment variable NEO4J_DATABASE. -| - -| --access-mode {read,write} -| Access mode. Defaults to WRITE. -| write -|=== - -[[cypher-shell-run]] -== Running Cypher Shell within the Neo4j distribution - -You can connect to a live Neo4j DBMS by running `cypher-shell` and passing in a username and a password argument: - -[source, shell] ----- -bin/cypher-shell -u neo4j -p ----- - -The output is the following: - -[queryresult] ----- -Connected to Neo4j at neo4j://localhost:7687 as user neo4j. -Type :help for a list of available commands or :exit to exit the shell. -Note that Cypher queries must end with a semicolon. ----- - -[[cypher-shell-standalone]] -== Running Cypher Shell from a different server - -You can also install the Cypher Shell tool on a different server (without Neo4j) and connect to a Neo4j DBMS. -Cypher Shell requires Java 21. - -[NOTE] -==== -DEB/RPM distributions both install Java, if it is not already installed, and the Cypher Shell executable. -The _cypher-shell_ files are available in the same DEB/RPM Linux repositories as Neo4j. - -The TAR distribution contains only the _cypher-shell_ files, so you must install Java manually. -==== - -. Download Cypher Shell from link:https://neo4j.com/deployment-center/?cypher-shell[Neo4j Deployment Center]. -. Connect to a Neo4j DBMS by running the `cypher-shell` command providing the Neo4j address, a username, and a password: -+ -[source, shell] ----- -cypher-shell/cypher-shell -a neo4j://IP-address:7687 -u neo4j -p ----- -+ -The output is the following: -+ -[queryresult] ----- -Connected to Neo4j at neo4j://IP-address:7687 as user neo4j. -Type :help for a list of available commands or :exit to exit the shell. -Note that Cypher queries must end with a semicolon. ----- - -[[cypher-shell-access-mode]] -== Changing the access mode - -By default, the access mode is set to `write`. -However, you can change the access mode to `read` or `write` using the `--access-mode` argument when connecting to a Neo4j DBMS with the `cypher-shell` command or by using the `:access-mode` command in the interactive shell. -Keep in mind that access mode can affect which servers in a cluster a query can get routed to. -For example, a server with `modeConstraint=SECONDARY` can only do reads. - -The following is an example of how you can connect to a Neo4j DBMS in read mode and then change the access mode to write in the interactive shell. - -. Connect to a Neo4j DBMS in read mode: -+ -[source, shell] ----- -bin/cypher-shell -u neo4j -p --access-mode read ----- -+ -[result] ----- -Connected to Neo4j using Bolt protocol version 5.4 at neo4j://localhost:7687 as user neo4j. -Type :help for a list of available commands or :exit to exit the shell. -Note that Cypher queries must end with a semicolon. ----- -. Try to create a node in read access mode: -+ -[source, shell] ----- -create (); ----- -+ -[result] ----- -Writing in read access mode not allowed. Attempted write to neo4j ----- -. Change the access mode to write in the interactive shell: -+ -[source, shell] ----- -:access-mode write ----- -. Verify the access mode: -+ -[source, shell] ----- -:access-mode ----- -+ -[result] ----- -Access mode write ----- -. Create a node in write access mode: -+ -[source, shell] ----- -create (); ----- -+ -[result] ----- -0 rows -ready to start consuming query after 66 ms, results consumed after another 0 ms -Added 1 nodes ----- - -[TIP] -==== -For more information on the `:access-mode` command, run the following command in the interactive shell: - -[source, shell] ----- -:help access-mode ----- - -[result] ----- -usage: :access-mode - Display current access mode -:access-mode read - Reconnect with read access mode -:access-mode write - Reconnect with write access mode ----- -==== - -[[cypher-shell-commands]] -== Available commands - -Once in the interactive shell, run the following command to display all available commands: - -.Running `help` -==== - -[source, shell] ----- -:help ----- - -The output is the following: - -[queryresult] ----- -Available commands: - :access-mode View or set access mode - :begin Open a transaction - :commit Commit the currently open transaction - :connect Connects to a database - :disconnect Disconnects from database - :exit Exit the logger - :help Show this help message - :history Statement history - :impersonate Impersonate user - :param Set the value of a query parameter - :rollback Rollback the currently open transaction - :source Executes Cypher statements from a file - :sysinfo Neo4j system information - :use Set the active database - - -For help on a specific command type: - :help command - -Keyboard shortcuts: - Up and down arrows to access statement history. - Tab for autocompletion of commands, hit twice to select suggestion from list using arrow keys. - -For help on cypher please visit: - https://neo4j.com/docs/cypher-manual/current/ ----- -==== - -[[cypher-shell-statements]] -== Running Cypher statements - -You can run Cypher statements in the following ways: - -* Typing Cypher statements directly into the interactive shell. -* Running Cypher statements from a file with the interactive shell. -* Running Cypher statements from a file as a `cypher-shell` argument. - -The examples in this section use the `MATCH (n) RETURN n LIMIT 5` Cypher statement and will return 5 nodes from the database. - -.Typing a Cypher statement directly into the interactive shell -==== - -[source, shell] ----- -MATCH (n) RETURN n LIMIT 5; ----- -==== - -[NOTE] -==== -The following two examples assume a file exists in the same folder you run the `cypher-shell` command from called `example.cypher` with the following contents: - -[source, cypher, role=noplay] ----- -MATCH (n) RETURN n LIMIT 5; ----- -==== - -.Running Cypher statements from a file with the interactive shell -==== - -You can use the `:source` command followed by the file name to run the Cypher statements in that file when in the Cypher interactive shell: - -[source, shell] ----- -:source /path/to/your/example.cypher ----- -==== - -.Running Cypher statements from a file as a `cypher-shell` argument. -==== - -You can pass a file containing Cypher statements as an argument when running `cypher-shell`. - -The examples here use the `--format plain` flag for a simple output. - -*Using `cat` (UNIX)* - -[source, shell] ----- -cat example.cypher | bin/cypher-shell -u neo4j -p --format plain ----- - -*Using `type` (Windows)* - -[source, shell] ----- -type example.cypher | bin/cypher-shell.bat -u neo4j -p --format plain ----- -==== - -[[cypher-shell-parameters]] -== Query parameters - -Cypher Shell supports querying based on parameters. -Use `:param ` to set parameters or the older arrow syntax `:param name => `. -When using the arrow syntax, expressions are restricted to a single line. -List current parameters with `:param`. -Clear parameters with `:param clear`. - -Parameters can be set to any Cypher expression. -Some expressions need to be evaluated online and require an open session. -The parameter expression is evaluated once. -For example, `:param {now: datetime()}` will set the parameter `now` to the current date and time at the time of setting the parameter. - -.Use parameters within Cypher Shell -==== - -. Set the parameter `alias` to `Robin` and `born` to `date('1940-03-20')` using the `:param` keyword: -+ -[source, shell] ----- -:param {alias: 'Robin', born: date('1940-03-20')} ----- -. Check the current parameters using the `:params` keyword: -+ -[source, shell] ----- -:param ----- -+ -[queryresult] ----- -{ - alias: 'Robin', - born: date('1981-08-01') -} ----- -+ -. Now use the `alias` and `born` parameters in a Cypher query: -+ -[source, shell] ----- -CREATE (:Person {name : 'Dick Grayson', alias : $alias, born: $born }); ----- -+ -[queryresult] ----- -Added 1 nodes, Set 3 properties, Added 1 labels ----- -+ -. Verify the result: -+ -[queryresult] ----- -MATCH (n) RETURN n; ----- -+ -[queryresult] ----- -+--------------------------------------------------------------------+ -| n | -+--------------------------------------------------------------------+ -| (:Person {name: "Bruce Wayne", alias: "Batman"}) | -| (:Person {name: "Selina Kyle", alias: ["Catwoman", "The Cat"]}) | -| (:Person {name: "Dick Grayson", alias: "Robin", born: 1940-03-20}) | -+--------------------------------------------------------------------+ -3 rows available after 2 ms, consumed after another 2 ms ----- -==== - -[[cypher-shell-transactions]] -== Transactions - -Cypher Shell supports explicit and implicit transactions. -Transaction states are controlled using the keywords `:begin`, `:commit`, and `:rollback`. - -Both explicit and implicit transactions run from Cypher Shell will have default transaction metadata attached that follows the convention -(see xref:monitoring/logging.adoc#attach-metadata-tx[Attach metadata to a transaction]). - -.Use fine-grained transaction control -==== -The example uses the dataset from the built-in Neo4j Browser guide, called MovieGraph. -For more information, see the link:https://neo4j.com/docs/browser-manual/current/visual-tour/#guides[Neo4j Browser documentation]. - -. Run a query that shows there is only one person in the database, who is born in 1964. -+ -[source, shell] ----- -MATCH (n:Person) WHERE n.born=1964 RETURN n.name AS name; ----- -+ -[queryresult] ----- -+----------------+ -| name | -+----------------+ -| "Keanu Reeves" | -+----------------+ - -1 row -ready to start consuming query after 9 ms, results consumed after another 0 ms ----- -+ -. Start a transaction and create another person born in the same year: -+ -[source, shell] ----- -:begin -neo4j# CREATE (:Person {name : 'Edward Mygma', born:1964}); ----- -+ -[queryresult] ----- -0 rows -ready to start consuming query after 38 ms, results consumed after another 0 ms -Added 1 nodes, Set 2 properties, Added 1 labels ----- -+ -. If you open a second Cypher Shell session and run the query from step 1, you will notice no changes from the latest `CREATE` statement. -+ -[source, shell] ----- -MATCH (n:Person) WHERE n.born=1964 RETURN n.name AS name; ----- -+ -[queryresult] ----- -+----------------+ -| name | -+----------------+ -| "Keanu Reeves" | -+----------------+ - -1 row -ready to start consuming query after 9 ms, results consumed after another 0 ms ----- -+ -. Go back to the first session and commit the transaction. -+ -[source, shell] ----- -neo4j# :commit ----- -. Now, if you run the query from step 1, you will see that Edward Mygma has been added to the database. -+ -[source, shell] ----- -MATCH (n:Person) WHERE n.born=1964 RETURN n.name AS name; ----- -+ -[queryresult] ----- -+----------------+ -| name | -+----------------+ -| "Keanu Reeves" | -| "Edward Mygma" | -+----------------+ - -2 rows -ready to start consuming query after 1 ms, results consumed after another 1 ms ----- -==== - -[[cypher-shell-procedures]] -== Procedures - -Cypher Shell supports running any procedures for which the current user is authorized. - -.Call the `dbms.showCurrentUser` procedure -==== - -[source, shell] ----- -CALL dbms.showCurrentUser(); ----- - -[queryresult] ----- -+------------------------------+ -| username | roles | flags | -+------------------------------+ -| "neo4j" | ["admin"] | [] | -+------------------------------+ - -1 row available after 66 ms, consumed after another 2 ms ----- -==== - - -[[cypher-shell-support]] -== Supported operating systems - -You can use the Cypher Shell CLI via `cmd` on Windows systems, and `bash` on Unix systems. - -Other shells may work as intended, but there is no test coverage to guarantee compatibility. - - -[[keyboard-shortcuts]] -== Keyboard shortcuts - -The following keyboard commands are available in interactive mode. - -[cols="1,1"] -|=== -|Key |Operation - -|↑ and ↓ (arrow keys) -|Access statement history. - -|↹ (tab) -|Autocompletion of commands and Cypher syntax. -Suggestions for Cypher syntax is not complete. - -|Home (key) -|Moves the cursor to the first character in the current line. - -|End (key) -|Moves the cursor to the last character in the current line. -|=== diff --git a/modules/ROOT/pages/tools/index.adoc b/modules/ROOT/pages/tools/index.adoc deleted file mode 100644 index 190c98b95..000000000 --- a/modules/ROOT/pages/tools/index.adoc +++ /dev/null @@ -1,24 +0,0 @@ -[[tools]] -= Tools -:description: This chapter describes the Neo4j tools _Neo4j Admin_, _Neo4j CLI_, and _Cypher Shell_. - -This chapter covers the following topics: - -* xref:tools/neo4j-admin/index.adoc[Neo4j Admin and Neo4j CLI] -- A description of the _Neo4j Admin_, _Neo4j CLI_ tools. -* Neo4j Admin commands -** xref:tools/neo4j-admin/consistency-checker.adoc[Consistency checker] -- How to check the consistency of a Neo4j database using Neo4j Admin. -** xref:tools/neo4j-admin/neo4j-admin-report.adoc[Neo4j Admin report] -- How to collect the most common information needed for remote assessments. -** xref:tools/neo4j-admin/neo4j-admin-store-info.adoc[Display store information] -- How to display information about a database store. -** xref:tools/neo4j-admin/neo4j-admin-memrec.adoc[Memory recommendations] -- How to get an initial recommendation for Neo4j memory settings. -** xref:tools/neo4j-admin/neo4j-admin-import.adoc[Import] -- How to import data into Neo4j using the command `neo4j-admin import`. -** xref:tools/neo4j-admin/unbind.adoc[Unbind a Neo4j cluster server] -- How to remove cluster state data from a Neo4j server. -** xref:tools/neo4j-admin/upload-to-aura.adoc[Upload to Neo4j Aura] -- How to upload an existing local database to a Neo4j Aura instance. -** xref:tools/neo4j-admin/migrate-database.adoc[Migrate a database] -- How to migrate a Neo4j database from one store format to another or to a later `MAJOR` version of the same format. -** xref:tools/neo4j-admin/migrate-configuration.adoc[Migrate the Neo4j configuration file] -- How to migrate a Neo4j configuration file. -** xref:tools/neo4j-admin/validate-config.adoc[Validate configurations] -- How to validate Neo4j configuration files, including the Log4j files. -* xref:tools/cypher-shell.adoc[Cypher Shell] -- How to use the Cypher Shell. -* link:https://neo4j.com/docs/browser-manual/current/[Neo4j Browser] is a tool for developers to interact with the graph. -It is the default interface for both Enterprise and Community Editions of the Neo4j database. -Neo4j Browser is bundled with Neo4j DBMS, including both Neo4j server and xref:installation/neo4j-desktop.adoc[Neo4j Desktop]. - - diff --git a/modules/ROOT/pages/tools/neo4j-admin/consistency-checker.adoc b/modules/ROOT/pages/tools/neo4j-admin/consistency-checker.adoc deleted file mode 100644 index cdce4ac05..000000000 --- a/modules/ROOT/pages/tools/neo4j-admin/consistency-checker.adoc +++ /dev/null @@ -1,259 +0,0 @@ -:description: Describes the Neo4j consistency checker. -[[consistency-checker]] -= Consistency checker - -You can use the `neo4j-admin database check` command to check the consistency of a database, a dump, or a backup. -The `neo4j-admin` tool is located in the _/bin_ directory. - -== Syntax - -The `neo4j-admin database check` command has the following syntax: - -[source,role=noheader] ----- -neo4j-admin database check [-h] [--expand-commands] [--force] [--verbose] - [--check-counts[=true|false]] [--check-graph[=true|false]] - [--check-indexes[=true|false]] [--check-property-owners[=true|false]] - [--additional-config=] [--max-off-heap-memory=] - [--report-path=] [--threads=] - [[--from-path-data= --from-path-txn=] | [--from-path= [--temp-path=]]] - ----- - -=== Description - -This command allows for checking the consistency of a database, a dump, or a backup. -It cannot be used with a database that is currently in use. - -Some checks can be quite expensive, so it may be useful to turn some of them off for very large databases. -Increasing the heap size might be a good idea. - -[NOTE] -==== -It is not recommended to use an NFS to check the consistency of a database, a dump, or a backup as this slows the process down significantly. -==== - -=== Parameters - -.`neo4j-admin database check` parameters -[options="header", cols="1m,3a"] -|=== -| Parameter -| Description - -| -|Name of the database to check. -|=== - -=== Options - -The `neo4j-admin database check` command has the following options: - -.`neo4j-admin database check` options -[options="header", cols="5m,6a,4m"] -|=== -| Option -| Description -| Default - -| --verbose -| Enable verbose output. -| - -|-h, --help -|Show this help message and exit. -| - -|--expand-commands -|Allow command expansion in config value evaluation. -| - -|--additional-config=footnote:[See xref:tools/neo4j-admin/index.adoc#_configuration[Tools -> Configuration] for details.] -| Configuration file with additional configuration. -| - -|--force -| Force a consistency check to be run, despite resources, and may run a more thorough check. -| - -|--check-indexes[=true\|false] -|Perform consistency checks on indexes. -|true - -|--check-graph[=true\|false] -|Perform consistency checks between nodes, relationships, properties, types, and tokens. -|true - -|--check-counts[=true\|false] -| Perform consistency checks on the counts. Requires , and may implicitly enable if it were not explicitly disabled. -| - -| --check-property-owners[=true\|false] -| Perform consistency checks on the ownership of properties. Requires , and may implicitly enable if it were not explicitly disabled. -|false - -| --report-path= -| Path to where a consistency report will be written. Interpreted as a directory, unless it has an extension of `.report`. -| . - -|--max-off-heap-memory= -| Maximum memory that `neo4j-admin` can use for page cache and various caching data structures to improve performance. -Value can be plain numbers, like `10000000` or e.g. `20G` for 20 gigabytes, or even e.g. `70%`, which will amount to 70% of currently free memory on the machine. -|90% - -|--threads= -|Number of threads used to check the consistency. -|The number of CPUs on the machine. - -|--from-path-data= -|Path to the databases directory, containing the database directory to source from. -| xref:configuration/configuration-settings.adoc#config_server.directories.data, [`server.directories.data`]/databases - -|--from-path-txn= -|Path to the transactions directory, containing the transaction directory for the database to source from. -| xref:configuration/configuration-settings.adoc#config_server.directories.transaction.logs.root[`server.directories.transaction.logs.root`] - -|--from-path= -|Path to the directory containing dump/backup artifacts that need to be checked for consistency. If the directory contains multiple backups, it will select the most recent backup chain, based on the transaction IDs found, to perform the consistency check. -| - -|--temp-path= -|Path to directory to be used as a staging area to extract dump/backup artifacts, if needed. -| -|=== - -[NOTE] -==== -The `--from-path=` option can also check database artifacts in AWS S3 buckets and Google Cloud storage buckets. -For more information, see <>. -==== - -== Output - -If the consistency checker does not find errors, it exits cleanly and does not produce a report. -If the consistency checker finds errors, it exits with an exit code other than `0` and writes a report file with a name in the format `inconsistencies-YYYY-MM-DD.HH24.MI.SS.report`. -The location of the report file is the current working directory, or as specified by the parameter `report-path`. - -== Examples - -The following are examples of how to check the consistency of a database, a dump, or a backup. - -[NOTE] -==== -`neo4j-admin database check` cannot be applied to xref:database-administration/composite-databases/concepts.adoc[Composite databases]. - It must be run directly on the databases that are associated with that Composite database. -==== - -=== Check the consistency of a local database - -Note that the database must be stopped first. - -[source,shell] ----- -bin/neo4j-admin database check neo4j ----- - -The output will look similar to the following: - -[source,shell] ----- -Running consistency check with max off-heap:618.6MiB - Store size:160.0KiB - Allocated page cache:160.0KiB - Off-heap memory for caching:618.5MiB -ID Generator consistency check -.................... 10% -.................... 20% -.................... 30% -.................... 40% -.................... 50% -.................... 60% -.................... 70% -.................... 80% -.................... 90% -.................... 100% -Index structure consistency check -.................... 10% -.................... 20% -.................... 30% -.................... 40% -.................... 50% -.................... 60% -.................... 70% -.................... 80% -.................... 90% -.................... 100% -Consistency check -.................... 10% -.................... 20% -.................... 30% -.................... 40% -.................... 50% -.................... 60% -.................... 70% -.................... 80% -.................... 90% -.................... 100% - ----- - -=== Check the consistency of a backup/dump - -Run with the `--from-path` option to check the consistency of a backup or a dump: - -[source,shell] ----- -bin/neo4j-admin database check --from-path= neo4j ----- - -[[check-database-from-cloud-uris]] -=== Check the consistency of a backup/dump stored in a cloud storage - -The following examples show how to check the consistency of a backup or a dump stored in a cloud storage bucket using the `--from-path` option. - -[.tabbed-example] -===== -[.include-with-AWS-S3] -====== - -include::partial$/aws-s3-overrides.adoc[] - -include::partial$/aws-s3-credentials.adoc[] - -. Run the `bin/neo4j-admin database check` command to check the consistency of your database located in your AWS S3 storage bucket. -The example assumes that you have backup or dump artifacts located in the `myBucket/myDirectory` folder in your bucket. -+ -[source, shell, role=noplay] ----- -bin/neo4j-admin database check mydatabase --from-path=s3://myBucket/myDirectory/ ----- -====== - -[.include-with-Google-cloud-storage] -====== - -include::partial$/gcs-credentials.adoc[] - -. Run the `bin/neo4j-admin database check` command to check the consistency of your database located in your Google storage bucket. -The example assumes that you have backup or dump artifacts located in the `myBucket/myDirectory` folder in your bucket. -+ -[source,shell] ----- -bin/neo4j-admin database check mydatabase --from-path=gs://myBucket/myDirectory/ ----- -====== - -[.include-with-Azure-cloud-storage] -====== - -include::partial$/azb-credentials.adoc[] - -. Run the `bin/neo4j-admin database check` command to check the consistency of your database located in your Azure blob storage container. -The example assumes that you have backup or dump artifacts located in the `myStorageAccount/myContainer/myDirectory` folder in Azure. -+ -[source,shell] ----- -bin/neo4j-admin database check mydatabase --from-path=azb://myStorageAccount/myContainer/myDirectory/ ----- -====== -===== diff --git a/modules/ROOT/pages/tools/neo4j-admin/index.adoc b/modules/ROOT/pages/tools/neo4j-admin/index.adoc deleted file mode 100644 index 9971e5531..000000000 --- a/modules/ROOT/pages/tools/neo4j-admin/index.adoc +++ /dev/null @@ -1,358 +0,0 @@ -:description: This section describes commands for managing and administering a Neo4j DBMS. -[[neo4j-admin]] -= Neo4j Admin and Neo4j CLI - -[[neo4j-admin-introduction]] -== Introduction - -`neo4j-admin` and `neo4j` are command-line tools for managing and administering a Neo4j DBMS. -Both are installed as part of the product and can be executed with a number of commands. -The `neo4j` commands are equivalent to the most important commands in the `neo4j-admin` server category. - -Both `neo4j-admin` and `neo4j` commands support the <> option, which prints the command's usage and options, and the <> option, which prints the version of the command. -All admin command options can also be provided in a file and passed to the command using the `@` prefix. -This is useful when the command line becomes too long to manage. -For example, `neo4j-admin database import full @/path/to/your/ mydb`. -For more information, see link:https://picocli.info/#AtFiles[Picocli -> AtFiles] official documentation. - -[NOTE] -==== -All admin commands must be invoked with the same user as Neo4j runs as. -This guarantees that Neo4j will have full rights to start and work with the database files you use. -==== - -== The `neo4j-admin` tool - -The `neo4j-admin` command-line tool is located in the xref:configuration/file-locations.adoc[_bin_] directory. - -=== General synopsis - -`neo4j-admin` has the following general synopsis: - -`neo4j-admin [category] [command] [subcommand]` - -=== `neo4j-admin` commands per category - -All administration commands, except for `help` and `version`, are organized into the following three categories: - -* `dbms` - DBMS-wide (for single and clustered environments) administration tasks -* `server` - server-wide administration tasks -* `database` - database-specific administration tasks -* `backup` - backup-specific tasks - -[[neo4j-admin-commands]] -.Available commands per category -[options="header", cols="25,30a,50a"] -|=== -| Category -| Command -| Description -.3+| `dbms` -| `set-default-admin` -| Sets the default admin user when no roles are present. - -| `set-initial-password` -| Sets the initial password of the initial admin user (`neo4j`). - -For details, see xref:configuration/set-initial-password.adoc[Set an initial password]. - -| `unbind-system-db` -| Removes and archives the cluster state of the `system` database so the instance can rebind to a new cluster state of the `system` database. - -.13+| `server` - -| `console` -| Starts DBMS server in the console. - -| `get-id` -| Displays the server ID of an instance. -The server ID can be used to specify a server in Cypher commands. - -| `license` -| Accept the license agreement. Possible options are `--accept-commercial` for the link:https://neo4j.com/terms/licensing/[commercial] or `--accept-evaluation` for the link:https://neo4j.com/terms/enterprise_us/[evaluation license]. -This command is required to be run before starting the Neo4j Enterprise Edition. - -| `memory-recommendation` -| Prints recommendations for Neo4j heap and page cache memory usage. - -For details, see xref:tools/neo4j-admin/neo4j-admin-memrec.adoc[Memory recommendations]. - -| `migrate-configuration` -| Migrates server configuration from the previous major version. - -| `report` -| Produces a ZIP/TAR of the most common information needed for remote assessments. - -For details, see xref:tools/neo4j-admin/neo4j-admin-report.adoc[Neo4j Admin report]. - -| `restart` -| Restarts the server daemon. - -| `start` -| Starts the server as a daemon. - -| `status` -| Gets the status of the server. - -| `stop` -| Stops the server daemon. - -| `unbind` -| Removes cluster state data from a stopped Neo4j server. - -For details, see xref:tools/neo4j-admin/unbind.adoc[Unbind a Neo4j cluster server]. - -| `validate-config` -| Performs configuration validation without starting the server. - -| `windows-service` -| A command whose subcommands can be used to install, uninstall, and update Neo4j as a Windows service. - -.11+| `database` - -| `aggregate-backup` label:deprecated[Deprecated in 2025.01] -| Aggregates a chain of backup artifacts into a single artifact. - -For details, see xref:backup-restore/aggregate.adoc[]. - -Replaced by `neo4j-admin backup aggregate`. - -| `backup` -| Performs an online backup from a running Neo4j enterprise server. - -| `check` -| Checks the consistency of a database. - -For details, see xref:tools/neo4j-admin/consistency-checker.adoc[Consistency checker]. - -| `copy` -| Copies a database and optionally applies filters. - -For details, see xref:backup-restore/copy-database.adoc[Copy a database store]. - -| `dump` -| Dumps a database into a single-file archive. - -| `import` -| Imports a collection of CSV files. - -For details, see xref:tools/neo4j-admin/neo4j-admin-import.adoc[Import]. - -| `info` -| Prints information about a Neo4j database store. - -For details, see xref:tools/neo4j-admin/neo4j-admin-store-info.adoc[Display store information]. - -| `load` -| Loads a database from an archive created with the `dump` command. - -| `migrate` -| Migrates a database from one store format to another or between versions of the same format. - -| `restore` -| Restores a backed up database. - -| `upload` -| Pushes a local database to a Neo4j Aura instance. - -For details, see xref:tools/neo4j-admin/upload-to-aura.adoc[Upload to Neo4j AuraDB]. - -.2+| `backup` - -|`inspect` -| Lists the metadata stored in the header of backup files. - -For details, see xref:backup-restore/inspect.adoc[]. - -|`aggregate` label:new[Introduced in 2025.01] -|Aggregates a chain of backup artifacts into a single artifact. - -For details, see xref:backup-restore/aggregate.adoc[]. -|=== - -== The `neo4j` tool - -The `neo4j` command-line tool is located in the xref:configuration/file-locations.adoc[_bin_] directory. - -=== General synopsis - -`neo4j` has the following general synopsis: - -`neo4j [command]` - -=== `neo4j` commands - -The command is an alias for the most important commands in the `neo4j-admin server` category. - -.Equivalence between `neo4j` and `neo4j-admin` commands -[options="header", cols="25,25a"] -|=== -| `neo4j` command -| Equivalent `neo4j-admin` command - -| `neo4j console` -| `neo4j-admin server console` - -| `neo4j restart` -| `neo4j-admin server restart` - -| `neo4j start` -| `neo4j-admin server start` - -| `neo4j status` -| `neo4j-admin server status` - -| `neo4j stop` -| `neo4j-admin server stop` - -| `neo4j windows-service` -| `neo4j-admin server windows-service` - -|=== - -== Version command - -Version can be obtained by invoking the `version` command, `--version` command option, or its short alternative `-V`, on the root level of both `neo4j` and `neo4j-admin` commands. -For example, `neo4j --version`, `neo4j-admin -V`, `neo4j-admin version`, or `neo4j version`. - -== Help command - -Help can be obtained by invoking the `help` command, `--help` command option, or its short alternative `-h`, with both `neo4j` and `neo4j-admin` commands. -`--help` and `-h` options can be invoked on any level, namely root, category, command, and subcommand. -For example, `neo4j --help`, `neo4j [command] -h`, `neo4j-admin -h`, `neo4j-admin [category] --help`, or `neo4j-admin [category] [command] [subcommand] -h`. - -The help command can be invoked on any level except the last one, which means command-level for commands that do not have subcommands or subcommand level for commands with subcommands. -The help command also accepts a parameter. -For example, `neo4j help`, `neo4j-admin help`, `neo4j-admin [category] help`, `neo4j-admin help [category]`, `neo4j help [command]`, or `neo4j-admin [category] [command ] help [subcommand]`. - -== Limitations - -When using both a multi-value option and a positional parameter, the multi-value option is "greedy" and pulls in the next positional parameter via its convertor. -This is a limitation of the underlying library, Picocli, and is not specific to Neo4j Admin. -See link:https://picocli.info/#_variable_arity_options_and_positional_parameters[Picocli -> Variable Arity Options and Positional Parameters] official documentation for more information. - -== Configuration - -Administration operations use the configuration specified in the _neo4j.conf_ file. -Sharing configuration between the DBMS and its administration tasks makes sense as most settings are the same. -In some cases, however, it is better to override some settings specified in _neo4j.conf_ by configuring the tasks (instead of updating the config settings in the _neo4j.conf_ file) because administration tasks generally use fewer resources than the DBMS. -For instance, if the page cache of your DBMS is configured to a very high value in _neo4j.conf_, and you want to override this because the admin tasks like backup do not need so much memory, you provide configuration for the admin tasks instead of updating the page cache setting in the _neo4j.conf_ file. - -There are several options for overriding settings specified in the _neo4j.conf_ file using administration tasks: - -* `--additional-config` option -- almost all administration commands support the `--additional-config` option, which you can use to provide a path (full path, local path, or symlinks) to a file with additional configuration. -The file format should be the same as _neo4j.conf_ (or _neo4j-admin.conf_). -The file must be readable by the user running the admin command. -* _neo4j-admin.conf_ -- a configuration file located in the same directory as the `neo4j.conf` file, which you can use to provide administration-task-specific settings. -* Some commands also support a command-specific configuration file. Such files are also looked for in the same directory as the _neo4j.conf_ file. -The following table lists command-specific configuration files: -+ -.Command-specific configuration files -[options="header", cols="25,25a"] -|=== -| Command -| Configuration file - -| `neo4j-admin database backup` -| `neo4j-admin-database-backup.conf` - -| `neo4j-admin database check` -| `neo4j-admin-database-check.conf` - -| `neo4j-admin database copy` -| `neo4j-admin-database-copy.conf` - -| `neo4j-admin database dump` -| `neo4j-admin-database-dump.conf` - -| `neo4j-admin database import` -| `neo4j-admin-database-import.conf` - -| `neo4j-admin database load` -| `neo4j-admin-database-load.conf` - -| `neo4j-admin database migrate` -| `neo4j-admin-database-migrate.conf` - -| `neo4j-admin database restore` -| `neo4j-admin-database-restore.conf` - -|=== - -All four configuration sources are optional and settings for administration commands are resolved from them with the following descending priority: - -. `--additional-config` option -. command-specific configuration file -. `neo4j-admin.conf` -. `neo4j.conf` - -[NOTE] -==== -The commands for launching the DBMS, `neo4j start` and `neo4j console`, must be configured only in the _neo4j.conf_ file. -==== - -== Environment variables - -Neo4j Admin can also use the following environment variables: - -[options="header", cols="1m,3a"] -|=== -| Environment variable -| Description - -| NEO4J_DEBUG -| Set to anything to enable debug output. - -| NEO4J_HOME -| Neo4j home directory. - -| NEO4J_CONF -|Path to the directory that contains _neo4j.conf_. - -| HEAP_SIZE -| Set JVM maximum heap size during command execution. -Takes a number and a unit, for example, 512m. - -| JAVA_OPTS -| Additional JVM arguments. -|=== - -If set, `HEAP_SIZE` and `JAVA_OPTS` override all relevant settings specified in the configuration file. - -[[neo4j-admin-exit-codes]] -== Exit codes - -When `neo4j` and `neo4j-admin` finish as expected, they exit with code `0`. -A non-zero exit code means something undesired happened during command execution. - -.Exit codes -[options="header", cols="1m,3a"] -|=== -| Exit code -| Description - -| `0` -| Successful execution. - -| 1 -| The command failed to execute. - -| 3 -| The command failed to execute because the database is not running. - -| 64 -| The command was invoked with incorrect options/parameters. See the printed usage for details. - -| 70 -| An exception was thrown, not handled otherwise. -|=== - -The non-zero exit code can contain further information about the error, for example, see the `backup` command's xref:backup-restore/online-backup.adoc#backup-command-exit-codes[exit codes]. - -== Command-line completion - -From 5.4 onwards, Neo4j supports command-line completion. - -* For Unix-based systems, the tab completion applies to the `neo4j` and `neo4j-admin` command line interfaces in terminals such as Bash and ZSH. -* For RPM and DEB packaged installations, the necessary files are automatically installed in `bash-completion`. -* For tarball installations, the files are located in the _bin/completion/_ directory with detailed instructions for manual installation. diff --git a/modules/ROOT/pages/tools/neo4j-admin/migrate-configuration.adoc b/modules/ROOT/pages/tools/neo4j-admin/migrate-configuration.adoc deleted file mode 100644 index 8798caa87..000000000 --- a/modules/ROOT/pages/tools/neo4j-admin/migrate-configuration.adoc +++ /dev/null @@ -1,103 +0,0 @@ -[[neo4j-admin-migrate-configuration]] -= Migrate the Neo4j configuration file -:description: This chapter describes the `neo4j-admin server migrate-configuration` command. - -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. -Starting with Neo4j 2025.01, the root location of the configuration directory is xref:configuration/configuration-settings.adoc#_server_directories_settings.adoc#config_server.directories.configuration[`server.directories.configuration=conf`]. -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? -[TIP] -==== -* Configuration migration is a purely mechanical process, and using the explicit migration with the `migrate-configuration` command allows you to inspect and customize the output. -* The command output provides valuable insight into the migration process, including notification about settings that could not have been meaningfully migrated, for instance, because the concept or behavior no longer exists in the new `MAJOR` version of the DBMS. -==== - -== Syntax - -The `neo4j-admin server migrate-configuration` command has the following syntax: - ----- -neo4j-admin server migrate-configuration [-h] [--expand-commands] - [--verbose] [--from-path=] - [--to-path=] ----- - -== Options - -The `neo4j-admin server migrate-configuration` command has the following options: - -.`neo4j-admin server migrate-configuration` options -[options="header", cols="2m,4a"] -|=== -| Option -| Description - -|--expand-commands -|Allow command expansion in config value evaluation. - -|--from-path= -|Path to the configuration directory used as a source for the migration. - -|-h, --help -|Show this help message and exit. - -|--to-path= -|Path to a directory where the migrated configuration files should be written. - -| --verbose -|Enable verbose output. -|=== - -=== Example - -The following example shows how to migrate a legacy configuration file to the current format: - -[source, shell, subs="attributes+"] ----- -bin/neo4j-admin server migrate-configuration --from-path=/path/to/legacy/neo4j-enterprise-5.9.0/conf/ --to-path=/path/to/new/neo4j-enterprise-5.26.1/conf/ ----- - -.Example output -[source] ----- -Keeping original user-logs.xml file at: /path/to/new/neo4j-enterprise-5.26.1/conf/user-logs.xml.old -User logging configuration xml file generated: /path/to/new/neo4j-enterprise-5.26.1/conf/user-logs.xml -Keeping original server-logs.xml file at: /path/to/new/neo4j-enterprise-5.26.1/conf/server-logs.xml.old -Server logging configuration xml file generated: /path/to/new/neo4j-enterprise-5.26.1/conf/server-logs.xml -server.directories.import=import UNCHANGED -server.bolt.enabled=true UNCHANGED -server.http.enabled=true UNCHANGED -server.https.enabled=false UNCHANGED -server.metrics.csv.rotation.compression=zip UNCHANGED -server.jvm.additional=-XX:+UseG1GC MIGRATED -> server.jvm.additional=-XX:+UseG1GC -server.jvm.additional=-XX:-OmitStackTraceInFastThrow MIGRATED -> server.jvm.additional=-XX:-OmitStackTraceInFastThrow -server.jvm.additional=-XX:+AlwaysPreTouch MIGRATED -> server.jvm.additional=-XX:+AlwaysPreTouch -server.jvm.additional=-XX:+UnlockExperimentalVMOptions MIGRATED -> server.jvm.additional=-XX:+UnlockExperimentalVMOptions -server.jvm.additional=-XX:+TrustFinalNonStaticFields MIGRATED -> server.jvm.additional=-XX:+TrustFinalNonStaticFields -server.jvm.additional=-XX:+DisableExplicitGC MIGRATED -> server.jvm.additional=-XX:+DisableExplicitGC -server.jvm.additional=-XX:-RestrictContended MIGRATED -> server.jvm.additional=-XX:-RestrictContended -server.jvm.additional=-Djdk.nio.maxCachedBufferSize=1024 MIGRATED -> server.jvm.additional=-Djdk.nio.maxCachedBufferSize=1024 -server.jvm.additional=-Dio.netty.tryReflectionSetAccessible=true MIGRATED -> server.jvm.additional=-Dio.netty.tryReflectionSetAccessible=true -server.jvm.additional=-Djdk.tls.ephemeralDHKeySize=2048 MIGRATED -> server.jvm.additional=-Djdk.tls.ephemeralDHKeySize=2048 -server.jvm.additional=-Djdk.tls.rejectClientInitiatedRenegotiation=true MIGRATED -> server.jvm.additional=-Djdk.tls.rejectClientInitiatedRenegotiation=true -server.jvm.additional=-XX:FlightRecorderOptions=stackdepth=256 MIGRATED -> server.jvm.additional=-XX:FlightRecorderOptions=stackdepth=256 -server.jvm.additional=-XX:+UnlockDiagnosticVMOptions MIGRATED -> server.jvm.additional=-XX:+UnlockDiagnosticVMOptions -server.jvm.additional=-XX:+DebugNonSafepoints MIGRATED -> server.jvm.additional=-XX:+DebugNonSafepoints -server.jvm.additional=--add-opens=java.base/java.nio=ALL-UNNAMED MIGRATED -> server.jvm.additional=--add-opens=java.base/java.nio=ALL-UNNAMED -server.jvm.additional=--add-opens=java.base/java.io=ALL-UNNAMED MIGRATED -> server.jvm.additional=--add-opens=java.base/java.io=ALL-UNNAMED -server.jvm.additional=--add-opens=java.base/sun.nio.ch=ALL-UNNAMED MIGRATED -> server.jvm.additional=--add-opens=java.base/sun.nio.ch=ALL-UNNAMED -server.jvm.additional=-Dlog4j2.disable.jmx=true MIGRATED -> server.jvm.additional=-Dlog4j2.disable.jmx=true -server.windows_service_name=neo4j UNCHANGED -Keeping original configuration file at: /path/to/new/neo4j-enterprise-5.26.1/conf/neo4j.conf.old ----- - -[NOTE] -==== -The example output is not to be used to populate a new Neo4j 5.26.1 _neo4j.conf_ file. - -The 2025.01 syntactically correct configuration file can be found at _/path/to/new/neo4j-enterprise-5.26.1/conf/_, where `/path/to/new/neo4j-enterprise-5.26.1/conf/` is the value of `--to-path=`. -==== diff --git a/modules/ROOT/pages/tools/neo4j-admin/migrate-database.adoc b/modules/ROOT/pages/tools/neo4j-admin/migrate-database.adoc deleted file mode 100644 index 4d869e3d6..000000000 --- a/modules/ROOT/pages/tools/neo4j-admin/migrate-database.adoc +++ /dev/null @@ -1,120 +0,0 @@ -:description: This chapter describes the `neo4j-admin database migrate` command. -[[neo4j-admin-migrate]] -= Migrate a database - -You can use the `neo4j-admin database migrate` command to migrate a Neo4j database from one store format to another or to a later `MAJOR` version of the same format. - -A store format defines how the data of a database is stored on the file system. - -The store format of a database is versioned with the `MAJOR.MINOR` scheme, independent of the xref:introduction.adoc#versioning[Neo4j calendar versioning]. -An upgrade to the latest `MINOR` format version is an automatic operation performed on database startup. -A migration to a higher `MAJOR` format version or another format is a manual action performed with the `migrate` command. - -The store format for new databases can be set with the xref:configuration/configuration-settings.adoc#config_db.format[`db.format`] configuration setting. - -== Syntax - -The `neo4j-admin database migrate` has the following syntax: - ----- -neo4j-admin database migrate [-h] [--expand-commands] - [--force-btree-indexes-to-range] - [--verbose] - [--additional-config=] [--pagecache=] - [--to-format=standard|high_limit|aligned|block] ----- - -[NOTE] -==== -The `neo4j-admin database migrate` command is run only on a stopped database. -==== - -=== Parameters - -.`neo4j-admin database migrate` parameters -[options="header", cols="1m,3a"] -|=== -| Parameter -| Description - -| -|Name of the database to migrate. Can contain * and ? for globbing. Note that * and ? have special meaning in some shells and might need to be escaped or used with quotes. -|=== - -=== Options - -The `neo4j-admin database migrate` command has the following options: - -.`neo4j-admin database migrate` options -[options="header", cols="5m,6a"] -|=== -| Option -| Description - -|--additional-config=footnote:[See xref:tools/neo4j-admin/index.adoc#_configuration[Tools -> Configuration] for details.] -|Configuration file with additional configuration. - -|--expand-commands -|Allow command expansion in config value evaluation. - -|--force-btree-indexes-to-range -|Special option for automatically turning all BTREE indexes/constraints into RANGE. Be aware that RANGE indexes are not always the optimal replacement of BTREEs and performance may be affected while the new indexes are populated. -See the Neo4j v5 migration guide online for more information. -The newly created indexes will be populated in the background on the first database start up following the migration and users should monitor the successful completion of that process. -[NOTE] -This option is only relevant when migrating from Neo4j 4.4. -|-h, --help -|Show this help message and exit. - -|--pagecache= -|The size of the page cache to use for the migration process. The general rule is that values up to the size of the database proportionally increase performance. - -|--to-format=standard\|high_limit\|aligned\|block -|Name of the format to migrate the store to. -If the format is specified, the target database is migrated to the latest known combination of `MAJOR` and `MINOR` versions of the specified format. -If not specified, the tool migrates the target database to the latest known combination of `MAJOR` and `MINOR` versions of the current format. - -|--verbose -|Enable verbose output. -|=== - -[NOTE] -==== -The block format is the default format for all databases in Enterprise Edition as long as they do not have the xref:configuration/configuration-settings.adoc#config_db.format[`db.format`] setting specified. -For more information on the block format, see xref:database-internals/store-formats.adoc[Store formats]. -==== - -== Example - -The following example migrates the `movies` database to the latest known combination of `MAJOR` and `MINOR` versions of the `block` format: - -[source, shell, subs="attributes+"] ----- -bin/neo4j-admin database migrate --to-format=block movies ----- - -.Example output -[source, shell, subs="attributes+"] ----- -2025-01-22 18:03:21.842+0000 INFO [c.n.c.d.EnterpriseMigrateStoreCommand] Starting migration for database 'movies' -2025-01-22 18:03:22.504+0000 INFO [o.n.k.i.s.StoreMigrator] 'record-aligned-1.1' has been identified as the current version of the store -2025-01-22 18:03:22.504+0000 INFO [o.n.k.i.s.StoreMigrator] 'block-block-1.1' has been identified as the target version of the store migration -2025-01-22 18:03:22.506+0000 INFO [o.n.k.i.s.StoreMigrator] Starting migration of database -2025-01-22 18:03:22.586+0000 INFO [o.n.k.i.s.StoreMigrator] Migrating Store files (1/1): -2025-01-22 18:03:22.588+0000 INFO [o.n.k.i.s.StoreMigrator] Store files -2025-01-22 18:03:23.270+0000 INFO [c.n.i.b.i.BlockBatchImporter] Import completed successfully, took 654ms. -2025-01-22 18:03:23.708+0000 INFO [o.n.k.i.s.StoreMigrator] 10% completed -2025-01-22 18:03:23.708+0000 INFO [o.n.k.i.s.StoreMigrator] 20% completed -2025-01-22 18:03:23.708+0000 INFO [o.n.k.i.s.StoreMigrator] 30% completed -2025-01-22 18:03:23.708+0000 INFO [o.n.k.i.s.StoreMigrator] 40% completed -2025-01-22 18:03:23.709+0000 INFO [o.n.k.i.s.StoreMigrator] 50% completed -2025-01-22 18:03:23.709+0000 INFO [o.n.k.i.s.StoreMigrator] 60% completed -2025-01-22 18:03:23.709+0000 INFO [o.n.k.i.s.StoreMigrator] 70% completed -2025-01-22 18:03:23.709+0000 INFO [o.n.k.i.s.StoreMigrator] 80% completed -2025-01-22 18:03:23.709+0000 INFO [o.n.k.i.s.StoreMigrator] 90% completed -2025-01-22 18:03:23.709+0000 INFO [o.n.k.i.s.StoreMigrator] 100% completed -2025-01-22 18:03:23.761+0000 INFO [o.n.k.i.s.StoreMigrator] Starting transaction logs migration. -2025-01-22 18:03:23.800+0000 INFO [o.n.k.i.s.StoreMigrator] Transaction logs migration completed. -2025-01-22 18:03:23.802+0000 INFO [o.n.k.i.s.StoreMigrator] Successfully finished migration of database, took 1s 296ms -2025-01-22 18:03:23.804+0000 INFO [c.n.c.d.EnterpriseMigrateStoreCommand] Database migration completed successfully ----- diff --git a/modules/ROOT/pages/tools/neo4j-admin/neo4j-admin-import.adoc b/modules/ROOT/pages/tools/neo4j-admin/neo4j-admin-import.adoc deleted file mode 100644 index 97ea5276c..000000000 --- a/modules/ROOT/pages/tools/neo4j-admin/neo4j-admin-import.adoc +++ /dev/null @@ -1,1870 +0,0 @@ -:description: This section describes how to perform bulk offline imports of data into Neo4j using the command line tool `neo4j-admin database import`. -[[neo4j-admin-import]] -= Import - -:rfc-4180: https://tools.ietf.org/html/rfc4180 - -`neo4j-admin database import` writes CSV data into Neo4j's native file format as fast as possible. + -Starting with version 5.26, Neo4j also provides support for the Parquet file format. - -You should use this tool when: - -* Import performance is important because you have a large amount of data (millions/billions of entities). -* The database can be taken offline and you have direct access to one of the servers hosting your Neo4j DBMS. -* The database is either empty or its content is unchanged since a previous incremental import. -* The CSV data is clean/fault-free (nodes are not duplicated and relationships' start and end nodes exist). -This tool can handle data faults but performance is not optimized. -If your data has a lot of faults, it is recommended to clean it using a dedicated tool before import. - -Other methods of importing data into Neo4j might be better suited to non-admin users: - -* Cypher(R) - CSV data can be bulk loaded via the Cypher command `LOAD CSV`. -See link:{neo4j-docs-base-uri}/cypher-manual/current/clauses/load-csv/[Cypher Manual -> `LOAD CSV`]. -* Graphical Tools - link:{neo4j-docs-base-uri}/aura/auradb/importing/importing-data/#_load_csv[Neo4j AuraDB -> Importing data]. - -[NOTE] -==== -Change Data Capture does **not** capture any data changes resulting from the use of `neo4j-admin database import`. -See link:{neo4j-docs-base-uri}/cdc/current/get-started/self-managed/#non-tx-log-changes/[Change Data Capture -> Key considerations] for more information. -==== - -== Overview - -The `neo4j-admin database import` command has two modes both used for initial data import: - -* _full_ -- used to import data into a non-existent empty database. -* _incremental_ -- used when import cannot be completed in a single _full_ import, by allowing the import to be a series of smaller imports. - -[NOTE] -==== -The user running `neo4j-admin database import` must have `WRITE` capabilities into `server.directories.data` and `server.directories.log`. -==== - -This section describes the `neo4j-admin database import` option. - - -[TIP] -==== -For information on `LOAD CSV`, see the link:{neo4j-docs-base-uri}/cypher-manual/current/clauses/load-csv[Cypher Manual -> `LOAD CSV`]. -For in-depth examples of using the command `neo4j-admin database import`, refer to the xref:tutorial/neo4j-admin-import.adoc[Tutorials -> Neo4j Admin import]. -==== - -These are some things you need to keep in mind when creating your input files: - -* Fields are comma-separated by default but a different delimiter can be specified. -* All files must use the same delimiter. -* Multiple data sources can be used for both nodes and relationships. -* A data source can optionally be provided using multiple files. -* A separate file with a header that provides information on the data fields, must be the first specified file of each data source. -* Fields without corresponding information in the header are not read. -* UTF-8 encoding is used. -* By default, the importer trims extra whitespace at the beginning and end of strings. - Quote your data to preserve leading and trailing whitespaces. - - -[NOTE] -.Indexes and constraints -==== -Indexes and constraints are not created during the import. -Instead, you have to add these afterward (see link:{neo4j-docs-base-uri}/cypher-manual/current/indexes-for-full-text-search[Cypher Manual -> Indexes]). - -You can use the `--schema` option to create and populate indexes and constraints during the import process. -The option is available in the Enterprise Edition and works only for the block format. -See <> for more information. -==== - -[[import-tool-full]] -== Full import - -[[import-tool-syntax]] -=== Syntax - -The syntax for importing a set of CSV files is: - -[source, syntax, role="nocopy"] ----- -neo4j-admin database import full [-h] [--expand-commands] [--verbose] [--auto-skip-subsequent-headers[=true|false]] - [--ignore-empty-strings[=true|false]] [--ignore-extra-columns[=true|false]] - [--legacy-style-quoting[=true|false]] [--normalize-types[=true|false]] - [--overwrite-destination[=true|false]] [--skip-bad-entries-logging[=true|false]] - [--skip-bad-relationships[=true|false]] [--skip-duplicate-nodes[=true|false]] [--strict - [=true|false]] [--trim-strings[=true|false]] [--additional-config=] - [--array-delimiter=] [--bad-tolerance=] [--delimiter=] - [--format=] [--high-parallel-io=on|off|auto] [--id-type=string|integer|actual] - [--input-encoding=] [--input-type=csv|parquet] - [--max-off-heap-memory=] [--quote=] [--read-buffer-size=] - [--report-file=] [--schema=] [--threads=] --nodes=[