Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add seed restore until section and remove 5.x seed provider info #2002

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from

Conversation

jackwaudby
Copy link
Contributor

  • Remove 5.x specific documentation from 'Seed from URI' section
  • Add section on seedRestoreUntil option

modules/ROOT/pages/clustering/databases.adoc Outdated Show resolved Hide resolved
modules/ROOT/pages/clustering/databases.adoc Outdated Show resolved Hide resolved
modules/ROOT/pages/clustering/databases.adoc Outdated Show resolved Hide resolved
modules/ROOT/pages/clustering/databases.adoc Outdated Show resolved Hide resolved
@jackwaudby
Copy link
Contributor Author

@NataliaIvakina the seed restore functionality/syntax will only be available in Cypher 25 which I believe won't be available until at least 2025.02? In which case how is best to proceed here, delay merging until 2025.02? As a side question do we have to clarify whether each section/functionality/example is compatible with Cypher 25 and/or Cypher 5?

@NataliaIvakina
Copy link
Contributor

@NataliaIvakina the seed restore functionality/syntax will only be available in Cypher 25 which I believe won't be available until at least 2025.02? In which case how is best to proceed here, delay merging until 2025.02? As a side question do we have to clarify whether each section/functionality/example is compatible with Cypher 25 and/or Cypher 5?

@jackwaudby, these are very good questions! I didn't know that Cypher 25 will be released later than Neo4j 2025.01. It complicates things.

Are you talking about the 'seedRestoreUntil' option? This option will be available only in Cypher 25, won't it?
If so, I think it makes no sense to merge the PR with the 2025.01 release if functionality is not available. Let's wait till 2025.02 and Cypher 25 to be released.

I suppose if a feature is available only in Cypher 25, we have to label it accordingly.
Do I understand correctly that this functionality is not available in Cypher 5? If so, we have to put a label, e.g., 'Not available in Cypher 5'.

@jackwaudby
Copy link
Contributor Author

jackwaudby commented Dec 19, 2024

I didn't know that Cypher 25 will be released later than Neo4j 2025.01.

Neither did I, I only found out yesterday (apparently it could still be later than 2025.01 as well). TBH somebody probably did tell me before but I wasn't listening 😆

Are you talking about the 'seedRestoreUntil' option? This option will be available only in Cypher 25, won't it?
If so, I think it makes no sense to merge the PR with the 2025.01 release if functionality is not available. Let's wait till 2025.02 and Cypher 25 to be released.

Yes, sounds good. Let's wait until 2025.02.

Do I understand correctly that this functionality is not available in Cypher 5?

Yes correct, this is not available in Cypher 5.

modules/ROOT/pages/clustering/databases.adoc Show resolved Hide resolved
modules/ROOT/pages/clustering/databases.adoc Show resolved Hide resolved
@@ -573,43 +572,29 @@ CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 'azb://myStorageAcco
======
=====

[[s3-seed-provider]]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the same question. Is this option removed? In which Neo4j and Cypher versions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From Neo4j 2025.01 s3 is supported only with the CloudSeedProvider. This is true for both Cypher 5 and Cypher 25 running on 2025.01.

However, in theory it would work if a user run Cypher 5 on 2025.01 and used the S3SeedProvider but it is not the approach we want to encourage.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is a balancing act to be done here. The S3SeedProvider still exists in order to support the Cypher 5 usage of it. So it needs to remain in the docs, but be clearly 'Cypher 5 only'.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change to the setting description to capture this: https://github.com/neo-technology/neo4j/pull/28957

@jackwaudby jackwaudby changed the title Add seed restore until section Add seed restore until section and remove 5.x seed provider info Jan 3, 2025

This will seed the database with transactions up to, but not including transaction 123.

Copy link
Contributor

@NataliaIvakina NataliaIvakina Jan 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[role=label--deprecated label--available-Cypher5]
[[s3-seed-provider]]
==== S3SeedProvider
The `S3SeedProvider` supports:
** `s3:`
[NOTE]
====
Neo4j 5 comes bundled with necessary libraries for AWS S3 connectivity.
Therefore, if you use `S3SeedProvider`,`aws cli` is not required but can be used with the `CloudSeedProvider`.
====
The `S3SeedProvider` requires additional configuration.
This is specified with the `seedConfig` option.
This option expects a comma-separated list of configurations.
Each configuration value is specified as a name followed by `=` and the value, as such:
[source, cypher, role="noplay"]
----
CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 's3:/myBucket/myBackup.backup', seedConfig: 'region=eu-west-1' }
----
`S3SeedProvider` also requires passing in credentials.
These are specified with the `seedCredentials` option.
Seed credentials are securely passed from the Cypher command to each server hosting the database.
For this to work, Neo4j on each server in the cluster must be configured with identical keystores.
This is identical to the configuration required by remote aliases, see xref:database-administration/aliases/remote-database-alias-configuration.adoc#remote-alias-config-DBMS_admin-A[Configuration of DBMS with remote database alias].
If this configuration is not performed, the `seedCredentials` option fails.
[source, cypher, role="noplay"]
----
CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 's3:/myBucket/myBackup.backup', seedConfig: 'region=eu-west-1', seedCredentials: [accessKey];[secretKey] }
----
Where `accessKey` and `secretKey` are provided by AWS.

Comment on lines +578 to +590
The `CloudSeedProvider` supports seeding up to a specific date or transaction ID using the `seedRestoreUntil` option.

==== Seed up to a specific date

[NOTE]
====
Neo4j 5 comes bundled with necessary libraries for AWS S3 connectivity.
Therefore, if you use `S3SeedProvider`,`aws cli` is not required but can be used with the `CloudSeedProvider`.
====
To seed up to a specific date, you need to pass the differential backup, which contains the data up to that date.

The `S3SeedProvider` requires additional configuration.
This is specified with the `seedConfig` option.
This option expects a comma-separated list of configurations.
Each configuration value is specified as a name followed by `=` and the value, as such:

[source, cypher, role="noplay"]
[source,shell]
----
CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 's3:/myBucket/myBackup.backup', seedConfig: 'region=eu-west-1' }
CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 's3:/myBucket/myBackup.backup', seedRestoreUntil: datetime("2019-06-01T18:40:32.142+0100") }
----

`S3SeedProvider` also requires passing in credentials.
These are specified with the `seedCredentials` option.
Seed credentials are securely passed from the Cypher command to each server hosting the database.
For this to work, Neo4j on each server in the cluster must be configured with identical keystores.
This is identical to the configuration required by remote aliases, see xref:database-administration/aliases/remote-database-alias-configuration.adoc#remote-alias-config-DBMS_admin-A[Configuration of DBMS with remote database alias].
If this configuration is not performed, the `seedCredentials` option fails.
This will seed the database with transactions committed before the provided timestamp.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'seed up to date' functionality is not properly present in 2025.01, so this section needs to be removed. It works to seed up to a transaction id, but Cypher Operations need to make a change to allow creating a datetime with system as the current database to make this work nicely.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, late breaking news, they merged the change before cut-off! https://github.com/neo-technology/neo4j/pull/28684

So this section about restore until datetime should remain in the doc.

@neo-technology-commit-status-publisher
Copy link
Collaborator

This PR includes documentation updates
View the updated docs at https://neo4j-docs-operations-2002.surge.sh

Updated pages:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants