diff --git a/modules/ROOT/pages/backup-restore/restore-backup.adoc b/modules/ROOT/pages/backup-restore/restore-backup.adoc index 3dba95084..751abc3b3 100644 --- a/modules/ROOT/pages/backup-restore/restore-backup.adoc +++ b/modules/ROOT/pages/backup-restore/restore-backup.adoc @@ -175,15 +175,14 @@ That means, if you restore `neo4j-2023-06-29T14-50-45.backup`, your database wil === Restore a database backup The following examples assume that you want to restore your data in a new database, called `mydatabase`. -If you want to replace an existing database, you need to stop it first, and add the option `--overwrite-destination=true` to the restore command. - -==== Restore a full backup +If you want to replace an existing database, you need to stop it first and add the option `--overwrite-destination=true` to the restore command. ++ . Restore a database backup by running the following command: + [source, shell,role=nocopy noplay] ---- -bin/neo4j-admin database restore --from-path=/path/to/backups/neo4j-2023-05-05T11-26-38.backup mydatabase +bin/neo4j-admin database restore --from-path=/path/to/backups/neo4j-2023-06-29T14-51-33.backup mydatabase ---- + The `--from-path=` argument must contain the path to the last backup of a chain, in this case, `neo4j-2023-06-29T14-51-33.backup`. @@ -200,9 +199,11 @@ You should also skip the `CREATE DATABASE` step afterward if you are replacing a CREATE DATABASE mydatabase ---- + === Restore data up to a specific date To restore data up to a specific date, you need to pass the backup artifact that contains the data up to that date. + + This example assumes that you want to restore your data in a new database, called `mydatabase`. If you want to replace an existing database, you need to stop it first, and add the option `--overwrite-destination=true` to the restore command. diff --git a/modules/ROOT/pages/database-administration/standard-databases/seed-from-uri.adoc b/modules/ROOT/pages/database-administration/standard-databases/seed-from-uri.adoc index 5974e0b93..d8e08120a 100644 --- a/modules/ROOT/pages/database-administration/standard-databases/seed-from-uri.adoc +++ b/modules/ROOT/pages/database-administration/standard-databases/seed-from-uri.adoc @@ -129,41 +129,6 @@ CREATE DATABASE foo OPTIONS { seedURI: 'azb://myStorageAccount/myContainer/myBac ===== -==== Support for seeding up to a date or a transaction ID - -Starting from Neo4j 2025.01, the `CloudSeedProvider` supports seeding up to a specific date or transaction ID using the `seedRestoreUntil` option. - -[role=label--new-2025.01] -Seed up to a specific date:: - -To seed up to a specific date, provide the differential backup containing the data up to that date. -+ -[source,cypher] ----- -CREATE DATABASE foo OPTIONS { - seedURI: 's3://myBucket/myBackup.backup', - seedRestoreUntil: datetime('2019-06-01T18:40:32.142+0100') -} ----- -+ -This will seed the database with transactions committed before the provided timestamp. - -[role=label--new-2025.01] -Seed up to a specific transaction ID:: - -To seed up to a specific transaction ID, provide the differential backup containing the data up to that transaction ID. -+ -[source,cypher] ----- -CREATE DATABASE foo OPTIONS { - seedURI: 's3://myBucket/myBackup.backup', - seedRestoreUntil: 123 -} ----- -+ -This will seed the database with transactions up to (but not including) transaction 123. - - [role=label--deprecated] [[s3-seed-provider]] === S3SeedProvider @@ -172,7 +137,7 @@ This will seed the database with transactions up to (but not including) transact The `S3SeedProvider` supports: -** `s3:` label:deprecated[Deprecated in 5.26] +** `s3:` [NOTE] @@ -248,3 +213,36 @@ Where `` and `` are provided by AWS. | `CloudSeedProvider` | `azb://mystorageaccount.blob/backupscontainer/backup1.backup` |=== + + +[[seed-restore-until-option]] +== Support for seeding up to a date or a transaction ID + +Starting from Neo4j 2025.01, when creating a database you can seed up to a specific date or transaction ID via the `seedRestoreUntil` option. + +The `seedRestoreUntil` option is supported by the `CloudSeedProvider` and the `FileSeedProvider`. + + +Seed up to a specific date:: + +To seed up to a specific date, you need to pass the differential backup, which contains the data up to that date. ++ +[source,shell] +---- +CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 's3://myBucket/myBackup.backup', seedRestoreUntil: datetime("2019-06-01T18:40:32.142+0100") } +---- ++ +This will seed the database with transactions committed before the provided timestamp. + + +Seed up to a specific transaction ID:: + +To seed up to a specific transaction ID, you need to pass the differential backup that contains the data up to that transaction ID. ++ +[source,shell] +---- +CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 's3://myBucket/myBackup.backup', seedRestoreUntil: 123 } +---- ++ +This will seed the database with transactions up to, but not including transaction 123. +