Skip to content

Commit b01767e

Browse files
Clarify which seed providers can be used with restoreUntil (#2368) (#2375)
1 parent b378127 commit b01767e

File tree

2 files changed

+39
-40
lines changed

2 files changed

+39
-40
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 & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -129,41 +129,6 @@ CREATE DATABASE foo OPTIONS { seedURI: 'azb://myStorageAccount/myContainer/myBac
129129
=====
130130

131131

132-
==== Support for seeding up to a date or a transaction ID
133-
134-
Starting from Neo4j 2025.01, the `CloudSeedProvider` supports seeding up to a specific date or transaction ID using the `seedRestoreUntil` option.
135-
136-
[role=label--new-2025.01]
137-
Seed up to a specific date::
138-
139-
To seed up to a specific date, provide the differential backup containing the data up to that date.
140-
+
141-
[source,cypher]
142-
----
143-
CREATE DATABASE foo OPTIONS {
144-
seedURI: 's3://myBucket/myBackup.backup',
145-
seedRestoreUntil: datetime('2019-06-01T18:40:32.142+0100')
146-
}
147-
----
148-
+
149-
This will seed the database with transactions committed before the provided timestamp.
150-
151-
[role=label--new-2025.01]
152-
Seed up to a specific transaction ID::
153-
154-
To seed up to a specific transaction ID, provide the differential backup containing the data up to that transaction ID.
155-
+
156-
[source,cypher]
157-
----
158-
CREATE DATABASE foo OPTIONS {
159-
seedURI: 's3://myBucket/myBackup.backup',
160-
seedRestoreUntil: 123
161-
}
162-
----
163-
+
164-
This will seed the database with transactions up to (but not including) transaction 123.
165-
166-
167132
[role=label--deprecated]
168133
[[s3-seed-provider]]
169134
=== S3SeedProvider
@@ -172,7 +137,7 @@ This will seed the database with transactions up to (but not including) transact
172137

173138
The `S3SeedProvider` supports:
174139

175-
** `s3:` label:deprecated[Deprecated in 5.26]
140+
** `s3:`
176141

177142

178143
[NOTE]
@@ -248,3 +213,36 @@ Where `<accessKey>` and `<secretKey>` are provided by AWS.
248213
| `CloudSeedProvider`
249214
| `azb://mystorageaccount.blob/backupscontainer/backup1.backup`
250215
|===
216+
217+
218+
[[seed-restore-until-option]]
219+
== Support for seeding up to a date or a transaction ID
220+
221+
Starting from Neo4j 2025.01, when creating a database you can seed up to a specific date or transaction ID via the `seedRestoreUntil` option.
222+
223+
The `seedRestoreUntil` option is supported by the `CloudSeedProvider` and the `FileSeedProvider`.
224+
225+
226+
Seed up to a specific date::
227+
228+
To seed up to a specific date, you need to pass the differential backup, which contains the data up to that date.
229+
+
230+
[source,shell]
231+
----
232+
CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 's3://myBucket/myBackup.backup', seedRestoreUntil: datetime("2019-06-01T18:40:32.142+0100") }
233+
----
234+
+
235+
This will seed the database with transactions committed before the provided timestamp.
236+
237+
238+
Seed up to a specific transaction ID::
239+
240+
To seed up to a specific transaction ID, you need to pass the differential backup that contains the data up to that transaction ID.
241+
+
242+
[source,shell]
243+
----
244+
CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 's3://myBucket/myBackup.backup', seedRestoreUntil: 123 }
245+
----
246+
+
247+
This will seed the database with transactions up to, but not including transaction 123.
248+

0 commit comments

Comments
 (0)