Skip to content

Commit fa80c1b

Browse files
Clarify which seed providers can be used with restoreUntil
1 parent 268f7b6 commit fa80c1b

File tree

2 files changed

+42
-32
lines changed

2 files changed

+42
-32
lines changed

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,15 +175,15 @@ 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+
Restore a full backup::
181+
+
182182
. Restore a database backup by running the following command:
183183
+
184184
[source, shell,role=nocopy noplay]
185185
----
186-
bin/neo4j-admin database restore --from-path=/path/to/backups/neo4j-2023-05-05T11-26-38.backup mydatabase
186+
bin/neo4j-admin database restore --from-path=/path/to/backups/neo4j-2023-06-29T14-51-33.backup mydatabase
187187
----
188188
+
189189
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 +200,12 @@ You should also skip the `CREATE DATABASE` step afterward if you are replacing a
200200
CREATE DATABASE mydatabase
201201
----
202202

203+
203204
=== Restore data up to a specific date
204205

205206
To restore data up to a specific date, you need to pass the backup artifact that contains the data up to that date. +
207+
You only need to point to the differential backup or the folder, and the restore command will find the rest of the chain.
208+
206209
This example assumes that you want to restore your data in a new database, called `mydatabase`.
207210
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.
208211

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

Lines changed: 35 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,38 @@ 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+
The `URLConnectionSeedProvider` does not support this option because it does not do directory listing.
213+
214+
Seed up to a specific date::
215+
216+
To seed up to a specific date, you need to pass the differential backup, which contains the data up to that date.
217+
+
218+
[source,shell]
219+
----
220+
CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 's3://myBucket/myBackup.backup', seedRestoreUntil: datetime("2019-06-01T18:40:32.142+0100") }
221+
----
222+
+
223+
This will seed the database with transactions committed before the provided timestamp.
224+
225+
226+
Seed up to a specific transaction ID::
227+
228+
To seed up to a specific transaction ID, you need to pass the differential backup that contains the data up to that transaction ID.
229+
+
230+
[source,shell]
231+
----
232+
CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 's3://myBucket/myBackup.backup', seedRestoreUntil: 123 }
233+
----
234+
+
235+
This will seed the database with transactions up to, but not including transaction 123.
236+

0 commit comments

Comments
 (0)