Skip to content

Commit 591e453

Browse files
Clarify which seed providers can be used with restoreUntil (#2368)
1 parent dacf6f4 commit 591e453

File tree

2 files changed

+39
-32
lines changed

2 files changed

+39
-32
lines changed

modules/ROOT/pages/backup-restore/restore-backup.adoc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,15 +175,14 @@ That means, if you restore `neo4j-2023-06-29T14-50-45.backup`, your database wil
175175
=== Restore a database backup
176176

177177
The following examples assume that you want to restore your data in a new database, called `mydatabase`.
178-
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.
179-
180-
==== Restore a full backup
178+
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.
181179

180+
+
182181
. Restore a database backup by running the following command:
183182
+
184183
[source, shell,role=nocopy noplay]
185184
----
186-
bin/neo4j-admin database restore --from-path=/path/to/backups/neo4j-2023-05-05T11-26-38.backup mydatabase
185+
bin/neo4j-admin database restore --from-path=/path/to/backups/neo4j-2023-06-29T14-51-33.backup mydatabase
187186
----
188187
+
189188
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
200199
CREATE DATABASE mydatabase
201200
----
202201

202+
203203
=== Restore data up to a specific date
204204

205205
To restore data up to a specific date, you need to pass the backup artifact that contains the data up to that date. +
206+
206207
This example assumes that you want to restore your data in a new database, called `mydatabase`.
207208
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.
208209

modules/ROOT/pages/database-administration/standard-databases/seed-from-uri.adoc

Lines changed: 34 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -122,33 +122,6 @@ CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 'azb://myStorageAcco
122122
======
123123
=====
124124

125-
==== Support for seeding up to a date or a transaction ID
126-
127-
Starting from Neo4j 2025.01, the `CloudSeedProvider` supports seeding up to a specific date or transaction ID using the `seedRestoreUntil` option.
128-
129-
[role=label--new-2025.01]
130-
Seed up to a specific date::
131-
132-
To seed up to a specific date, you need to pass the differential backup, which contains the data up to that date.
133-
+
134-
[source,shell]
135-
----
136-
CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 's3://myBucket/myBackup.backup', seedRestoreUntil: datetime("2019-06-01T18:40:32.142+0100") }
137-
----
138-
+
139-
This will seed the database with transactions committed before the provided timestamp.
140-
141-
[role=label--new-2025.01]
142-
Seed up to a specific transaction ID::
143-
144-
To seed up to a specific transaction ID, you need to pass the differential backup that contains the data up to that transaction ID.
145-
+
146-
[source,shell]
147-
----
148-
CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 's3://myBucket/myBackup.backup', seedRestoreUntil: 123 }
149-
----
150-
+
151-
This will seed the database with transactions up to, but not including transaction 123.
152125

153126
[role=label--deprecated]
154127
[[s3-seed-provider]]
@@ -226,4 +199,37 @@ Where `accessKey` and `secretKey` are provided by AWS.
226199
| `azb:`
227200
| `CloudSeedProvider`
228201
| `azb://mystorageaccount.blob/backupscontainer/backup1.backup`
229-
|===
202+
|===
203+
204+
205+
[[seed-restore-until-option]]
206+
== Support for seeding up to a date or a transaction ID
207+
208+
Starting from Neo4j 2025.01, when creating a database you can seed up to a specific date or transaction ID via the `seedRestoreUntil` option.
209+
210+
The `seedRestoreUntil` option is supported by the `CloudSeedProvider` and the `FileSeedProvider`.
211+
212+
213+
Seed up to a specific date::
214+
215+
To seed up to a specific date, you need to pass the differential backup, which contains the data up to that date.
216+
+
217+
[source,shell]
218+
----
219+
CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 's3://myBucket/myBackup.backup', seedRestoreUntil: datetime("2019-06-01T18:40:32.142+0100") }
220+
----
221+
+
222+
This will seed the database with transactions committed before the provided timestamp.
223+
224+
225+
Seed up to a specific transaction ID::
226+
227+
To seed up to a specific transaction ID, you need to pass the differential backup that contains the data up to that transaction ID.
228+
+
229+
[source,shell]
230+
----
231+
CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 's3://myBucket/myBackup.backup', seedRestoreUntil: 123 }
232+
----
233+
+
234+
This will seed the database with transactions up to, but not including transaction 123.
235+

0 commit comments

Comments
 (0)