diff --git a/modules/ROOT/pages/backup-restore/restore-backup.adoc b/modules/ROOT/pages/backup-restore/restore-backup.adoc index 849ad9c66..947ca170e 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 cef35647b..2337b74d5 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 @@ -122,33 +122,6 @@ CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 'azb://myStorageAcco ====== ===== -==== 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, 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. - -[role=label--new-2025.01] -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. [role=label--deprecated] [[s3-seed-provider]] @@ -226,4 +199,37 @@ Where `accessKey` and `secretKey` are provided by AWS. | `azb:` | `CloudSeedProvider` | `azb://mystorageaccount.blob/backupscontainer/backup1.backup` -|=== \ No newline at end of file +|=== + + +[[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. +