Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 26 additions & 100 deletions modules/ROOT/pages/tools/neo4j-admin/migrate-database.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ You can use the `neo4j-admin database migrate` command to migrate a Neo4j databa

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 Neo4j versioning.
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.

Expand Down Expand Up @@ -62,10 +62,7 @@ The `neo4j-admin database migrate` command has the following options:
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]
BTREE indexes are not supported in Neo4j 5 and the `neo4j-admin database migrate` command will remove all BTREE indexes and BTREE index-backed constraints.
It is recommended to create valid replacements before migrating the database.
For more information, see link:https://neo4j.com/docs/upgrade-migration-guide/current/version-5/migration/planning/#_prepare_indexes[[Upgrade and Migration Guide -> Prepare indexes].

This option is only relevant when migrating from Neo4j 4.4.
|-h, --help
|Show this help message and exit.

Expand All @@ -83,112 +80,41 @@ If not specified, the tool migrates the target database to the latest known comb

[NOTE]
====
The block format is the default format for all newly-created databases in Enterprise Edition as long as they do not have the xref:configuration/configuration-settings.adoc#config_db.format[`db.format`] setting specified.
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 `high_limit` format:
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=high_limit movies
bin/neo4j-admin database migrate --to-format=block movies
----

.Example output
[source, shell, subs="attributes+"]
----
2022-11-10 12:55:35.542+0000 INFO [o.n.c.d.MigrateStoreCommand] Starting migration for database 'movies'
2022-11-10 12:55:36.061+0000 INFO [o.n.k.i.s.StoreMigrator] 'record-aligned-1.1' has been identified as the current version of the store
2022-11-10 12:55:36.061+0000 INFO [o.n.k.i.s.StoreMigrator] 'record-high_limit-1.1' has been identified as the target version of the store migration
2022-11-10 12:55:36.065+0000 INFO [o.n.k.i.s.StoreMigrator] Starting migration of database
2022-11-10 12:55:36.154+0000 INFO [o.n.k.i.s.StoreMigrator] Migrating Store files (1/7):
2022-11-10 12:55:36.828+0000 INFO [o.n.k.i.s.f.RecordFormatSelector] Selected RecordFormat:HighLimitV5_0[high_limit-1.1] record format from store $NEO4J_HOME/data/databases/movies/migrate
2022-11-10 12:55:36.828+0000 INFO [o.n.k.i.s.f.RecordFormatSelector] Selected format from the store files: RecordFormat:HighLimitV5_0[high_limit-1.1]
2022-11-10 12:55:37.020+0000 INFO [o.n.i.b.ImportLogic] Import starting
2022-11-10 12:55:37.924+0000 INFO [o.n.k.i.s.StoreMigrator] 10% completed
2022-11-10 12:55:37.924+0000 INFO [o.n.k.i.s.StoreMigrator] 20% completed
2022-11-10 12:55:37.924+0000 INFO [o.n.k.i.s.StoreMigrator] 30% completed
2022-11-10 12:55:37.924+0000 INFO [o.n.k.i.s.StoreMigrator] 40% completed
2022-11-10 12:55:37.924+0000 INFO [o.n.k.i.s.StoreMigrator] 50% completed
2022-11-10 12:55:37.924+0000 INFO [o.n.k.i.s.StoreMigrator] 60% completed
2022-11-10 12:55:37.924+0000 INFO [o.n.k.i.s.StoreMigrator] 70% completed
2022-11-10 12:55:37.924+0000 INFO [o.n.k.i.s.StoreMigrator] 80% completed
2022-11-10 12:55:37.924+0000 INFO [o.n.k.i.s.StoreMigrator] 90% completed
2022-11-10 12:55:37.924+0000 INFO [o.n.k.i.s.StoreMigrator] 100% completed
2022-11-10 12:55:37.925+0000 INFO [o.n.i.b.ImportLogic] Import completed successfully, took 903ms. Imported:
171 nodes
253 relationships
564 properties
2022-11-10 12:55:38.515+0000 INFO [o.n.k.i.s.StoreMigrator] Migrating text-1.0 (2/7):
2022-11-10 12:55:38.515+0000 INFO [o.n.k.i.s.StoreMigrator] 10% completed
2022-11-10 12:55:38.515+0000 INFO [o.n.k.i.s.StoreMigrator] 20% completed
2022-11-10 12:55:38.515+0000 INFO [o.n.k.i.s.StoreMigrator] 30% completed
2022-11-10 12:55:38.515+0000 INFO [o.n.k.i.s.StoreMigrator] 40% completed
2022-11-10 12:55:38.515+0000 INFO [o.n.k.i.s.StoreMigrator] 50% completed
2022-11-10 12:55:38.515+0000 INFO [o.n.k.i.s.StoreMigrator] 60% completed
2022-11-10 12:55:38.515+0000 INFO [o.n.k.i.s.StoreMigrator] 70% completed
2022-11-10 12:55:38.515+0000 INFO [o.n.k.i.s.StoreMigrator] 80% completed
2022-11-10 12:55:38.516+0000 INFO [o.n.k.i.s.StoreMigrator] 90% completed
2022-11-10 12:55:38.516+0000 INFO [o.n.k.i.s.StoreMigrator] 100% completed
2022-11-10 12:55:38.516+0000 INFO [o.n.k.i.s.StoreMigrator] Migrating range-1.0 indexes (3/7):
2022-11-10 12:55:38.516+0000 INFO [o.n.k.i.s.StoreMigrator] 10% completed
2022-11-10 12:55:38.516+0000 INFO [o.n.k.i.s.StoreMigrator] 20% completed
2022-11-10 12:55:38.516+0000 INFO [o.n.k.i.s.StoreMigrator] 30% completed
2022-11-10 12:55:38.516+0000 INFO [o.n.k.i.s.StoreMigrator] 40% completed
2022-11-10 12:55:38.516+0000 INFO [o.n.k.i.s.StoreMigrator] 50% completed
2022-11-10 12:55:38.516+0000 INFO [o.n.k.i.s.StoreMigrator] 60% completed
2022-11-10 12:55:38.516+0000 INFO [o.n.k.i.s.StoreMigrator] 70% completed
2022-11-10 12:55:38.516+0000 INFO [o.n.k.i.s.StoreMigrator] 80% completed
2022-11-10 12:55:38.516+0000 INFO [o.n.k.i.s.StoreMigrator] 90% completed
2022-11-10 12:55:38.516+0000 INFO [o.n.k.i.s.StoreMigrator] 100% completed
2022-11-10 12:55:38.517+0000 INFO [o.n.k.i.s.StoreMigrator] Migrating Fulltext indexes (4/7):
2022-11-10 12:55:38.517+0000 INFO [o.n.k.i.s.StoreMigrator] 10% completed
2022-11-10 12:55:38.517+0000 INFO [o.n.k.i.s.StoreMigrator] 20% completed
2022-11-10 12:55:38.517+0000 INFO [o.n.k.i.s.StoreMigrator] 30% completed
2022-11-10 12:55:38.517+0000 INFO [o.n.k.i.s.StoreMigrator] 40% completed
2022-11-10 12:55:38.517+0000 INFO [o.n.k.i.s.StoreMigrator] 50% completed
2022-11-10 12:55:38.517+0000 INFO [o.n.k.i.s.StoreMigrator] 60% completed
2022-11-10 12:55:38.517+0000 INFO [o.n.k.i.s.StoreMigrator] 70% completed
2022-11-10 12:55:38.517+0000 INFO [o.n.k.i.s.StoreMigrator] 80% completed
2022-11-10 12:55:38.517+0000 INFO [o.n.k.i.s.StoreMigrator] 90% completed
2022-11-10 12:55:38.517+0000 INFO [o.n.k.i.s.StoreMigrator] 100% completed
2022-11-10 12:55:38.517+0000 INFO [o.n.k.i.s.StoreMigrator] Migrating point-1.0 indexes (5/7):
2022-11-10 12:55:38.517+0000 INFO [o.n.k.i.s.StoreMigrator] 10% completed
2022-11-10 12:55:38.518+0000 INFO [o.n.k.i.s.StoreMigrator] 20% completed
2022-11-10 12:55:38.518+0000 INFO [o.n.k.i.s.StoreMigrator] 30% completed
2022-11-10 12:55:38.518+0000 INFO [o.n.k.i.s.StoreMigrator] 40% completed
2022-11-10 12:55:38.518+0000 INFO [o.n.k.i.s.StoreMigrator] 50% completed
2022-11-10 12:55:38.518+0000 INFO [o.n.k.i.s.StoreMigrator] 60% completed
2022-11-10 12:55:38.518+0000 INFO [o.n.k.i.s.StoreMigrator] 70% completed
2022-11-10 12:55:38.518+0000 INFO [o.n.k.i.s.StoreMigrator] 80% completed
2022-11-10 12:55:38.518+0000 INFO [o.n.k.i.s.StoreMigrator] 90% completed
2022-11-10 12:55:38.518+0000 INFO [o.n.k.i.s.StoreMigrator] 100% completed
2022-11-10 12:55:38.518+0000 INFO [o.n.k.i.s.StoreMigrator] Migrating Token indexes (6/7):
2022-11-10 12:55:38.518+0000 INFO [o.n.k.i.s.StoreMigrator] 10% completed
2022-11-10 12:55:38.519+0000 INFO [o.n.k.i.s.StoreMigrator] 20% completed
2022-11-10 12:55:38.519+0000 INFO [o.n.k.i.s.StoreMigrator] 30% completed
2022-11-10 12:55:38.519+0000 INFO [o.n.k.i.s.StoreMigrator] 40% completed
2022-11-10 12:55:38.519+0000 INFO [o.n.k.i.s.StoreMigrator] 50% completed
2022-11-10 12:55:38.519+0000 INFO [o.n.k.i.s.StoreMigrator] 60% completed
2022-11-10 12:55:38.519+0000 INFO [o.n.k.i.s.StoreMigrator] 70% completed
2022-11-10 12:55:38.519+0000 INFO [o.n.k.i.s.StoreMigrator] 80% completed
2022-11-10 12:55:38.519+0000 INFO [o.n.k.i.s.StoreMigrator] 90% completed
2022-11-10 12:55:38.519+0000 INFO [o.n.k.i.s.StoreMigrator] 100% completed
2022-11-10 12:55:38.519+0000 INFO [o.n.k.i.s.StoreMigrator] Migrating text-2.0 (7/7):
2022-11-10 12:55:38.519+0000 INFO [o.n.k.i.s.StoreMigrator] 10% completed
2022-11-10 12:55:38.519+0000 INFO [o.n.k.i.s.StoreMigrator] 20% completed
2022-11-10 12:55:38.519+0000 INFO [o.n.k.i.s.StoreMigrator] 30% completed
2022-11-10 12:55:38.520+0000 INFO [o.n.k.i.s.StoreMigrator] 40% completed
2022-11-10 12:55:38.520+0000 INFO [o.n.k.i.s.StoreMigrator] 50% completed
2022-11-10 12:55:38.520+0000 INFO [o.n.k.i.s.StoreMigrator] 60% completed
2022-11-10 12:55:38.520+0000 INFO [o.n.k.i.s.StoreMigrator] 70% completed
2022-11-10 12:55:38.520+0000 INFO [o.n.k.i.s.StoreMigrator] 80% completed
2022-11-10 12:55:38.520+0000 INFO [o.n.k.i.s.StoreMigrator] 90% completed
2022-11-10 12:55:38.520+0000 INFO [o.n.k.i.s.StoreMigrator] 100% completed
2022-11-10 12:55:38.628+0000 INFO [o.n.k.i.s.StoreMigrator] Starting transaction logs migration.
2022-11-10 12:55:38.660+0000 INFO [o.n.k.i.s.StoreMigrator] Transaction logs migration completed.
2022-11-10 12:55:38.696+0000 INFO [o.n.k.i.s.StoreMigrator] Successfully finished migration of database, took 2s 631ms
2022-11-10 12:55:38.698+0000 INFO [o.n.c.d.MigrateStoreCommand] Database migration completed successfully
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
----
Loading