If you are moving from an on-premises offering (Neo4j Community or Enterprise) to AuraDB you may need to change the store format. For large databases, it is better to do this before migrating from on-premises to an AuraDB Instance.
To check the store format of your database, use the command below:
./neo4j-admin store-info ../data/databases/movies
You should get something like the following returned:
Database name: movies
Database in use: false
Store format version: SF4.3.0
Store format introduced in: 4.3.0
Last committed transaction id:18
Store needs recovery: false
If the store format is not AF4.3.0, as in the above, you will need to migrate the store format. This is done by taking a dump of the database and then copying it to the new store format.
- Take a backup by running the following command:
./neo4j-admin backup --backup-dir=path/to/backup-dir --database=<DB NAME> --from=hostname:6362
You will see output like the following:./neo4j-admin backup --backup-dir=/Users/aj/backups --database=movies --from=localhost:6362
Selecting JVM - Version:11.0.9+7-LTS, Name:Java HotSpot(TM) 64-Bit Server VM, Vendor:Oracle Corporation
2022-04-27 20:42:14.372+0000 INFO [c.n.b.v.BackupOutputMonitor] Start receiving transactions from 20
2022-04-27 20:42:14.496+0000 INFO [c.n.b.v.BackupOutputMonitor] Finish receiving transactions at 20, took 121ms
2022-04-27 20:42:14.498+0000 INFO [c.n.b.v.BackupOutputMonitor] Start recovering store
2022-04-27 20:42:14.531+0000 INFO [c.n.b.v.BackupOutputMonitor] Finish recovering store, took 32ms
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%
2022-04-27 20:42:15.992+0000 INFO [c.n.b.v.BackupOutputMonitor] Finished, took 2s 519ms
Backup complete successful. - Verify the consistency of the backup.
./neo4j-admin check-consistency --backup=/Users/aj/backup/movies
You will get output like the following:./neo4j-admin check-consistency --backup=/Users/aj/backup/movies
Selecting JVM - Version:11.0.9+7-LTS, Name:Java HotSpot(TM) 64-Bit Server VM, Vendor:Oracle Corporation
2022-04-27 20:54:19.660+0000 WARN [o.n.i.p.PageCache] The dbms.memory.pagecache.size setting has not been configured. It is recommended that this setting is always explicitly configured, to ensure the system has a balanced configuration. Until then, a computed heuristic value of 6442450944 bytes will be used instead. Run `neo4j-admin memrec` for memory configuration suggestions.
2022-04-27 20:54:19.721+0000 INFO [o.n.k.i.s.f.RecordFormatSelector] Selected RecordFormat:PageAlignedV4_3[AF4.3.0] record format from store /Users/aj/backup/movies
2022-04-27 20:54:19.721+0000 INFO [o.n.k.i.s.f.RecordFormatSelector] Format not configured for store /Users/aj/backup/movies. Selected format from the store files: RecordFormat:PageAlignedV4_3[AF4.3.0]
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% - Run the neo4j-admin copy command:
neo4j-admin copy --from-path=/Users/aj/backup/movies --to-database=movies1 --to-format=aligned
This will copy the backup to a new database with the correct format.
Now when you run the command ./neo4j-admin store-info...you'll see that the format has changed.
Database name: movies1
Database in use: false
Store format version: AF4.3.0
Store format introduced in: 4.3.0
Last committed transaction id:4
Store needs recovery: false
Comments
0 comments
Please sign in to leave a comment.