Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions modules/ROOT/pages/backup-restore/restore-backup.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand All @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand Down Expand Up @@ -226,4 +199,37 @@ Where `accessKey` and `secretKey` are provided by AWS.
| `azb:`
| `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.