-
Notifications
You must be signed in to change notification settings - Fork 76
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 example on how to CREATE db from the seed URI #2152
Changes from all commits
b435fac
95a9b09
a4aac8a
42cc78a
edd331b
6edad52
bd73930
0d4516f
d650f7b
c2dcbab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,17 +92,19 @@ Replaced by `existingDataSeedServer`. | |
| | ||
Defines an identical seed from an external source which will be used to seed all servers. | ||
|
||
For examples, see xref::clustering/databases.adoc#cluster-seed-uri[Seed from URI]. | ||
|
||
| `seedConfig` | ||
| Comma-separated list of configuration values. | ||
| | ||
For more information see xref::clustering/databases.adoc#cluster-seed-uri[Seed from URI]. | ||
|
||
|
||
| `seedCredentials` label:deprecated[Deprecated in 5.26] | ||
| credentials | ||
| | ||
Defines credentials that need to be passed into certain seed providers. | ||
It is recommended to use the `CloudSeedProvider` seed provider, which does not require this configuration when seeding from cloud storage. | ||
For more information see xref::clustering/databases.adoc#cloud-seed-provider[CloudSeedProvider]. | ||
For more information, see xref::clustering/databases.adoc#cloud-seed-provider[CloudSeedProvider]. | ||
|
||
| `txLogEnrichment` | ||
| `FULL` \| `DIFF` \| `OFF` | ||
|
@@ -214,6 +216,56 @@ The `IF NOT EXISTS` and `OR REPLACE` parts of these commands cannot be used toge | |
==== | ||
|
||
|
||
==== Create a database using seeding options | ||
|
||
In Neo4j, you can create a database using the URI of the seed. | ||
The following example shows how to seed the database `customers` from Amazon S3. | ||
|
||
[source, cypher] | ||
---- | ||
CREATE DATABASE customers OPTIONS {existingData: 'use', seedURI:'s3://myBucket/myBackup.backup'} | ||
---- | ||
|
||
Neo4j has built-in support for a seed from a mounted file system (file), FTP server, HTTP/HTTPS server, Amazon S3, Google Cloud Storage, and Azure Cloud Storage. | ||
The seed provider is determined by the xref:configuration/configuration-settings.adoc#config_dbms.databases.seed_from_uri_providers[dbms.databases.seed_from_uri_providers] setting, which defaults to `CloudSeedProvider`. | ||
To use other providers, you must configure `dbms.databases.seed_from_uri_providers` accordingly. | ||
|
||
.Seed providers supported in Neo4j | ||
[cols="2,1,3",options="header"] | ||
|=== | ||
| Seed provider | ||
| URL scheme | ||
| URI example | ||
|
||
| `FileSeedProvider` | ||
| `file:` | ||
| `file:/tmp/backup1.backup` | ||
|
||
| `URLConnectionSeedProvider`footnote:[From 2025.01, `URLConnectionSeedProvider` does not support `file`.] | ||
| `ftp:` + | ||
`http:` + | ||
`https:` | ||
| `ftp://myftp.com/backups/backup1.backup` + | ||
`/http://myhttp.com/backups/backup1.backup` + | ||
`/https://myhttps.com/backups/backup1.backup` | ||
|
||
| `S3SeedProvider` label:deprecated[Deprecated in 5.26] | ||
| `s3:` | ||
| `s3://mybucket/backups/backup1.backup` | ||
|
||
| `CloudSeedProvider` | ||
| `s3:` + | ||
`gs:` + | ||
`azb:` | ||
| `s3://mybucket/backups/backup1.backup` + | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting, there is a mismatch between the examples and this table here and on the other page. In the examples, the URLs are s3:/mybucket/backups/backup1.backup, gs:/mybucket/backups/backup1.backup, and azb:/mystorageaccount.blob/backupscontainer/backup1.backup, while in the tables we see double // after the s3, gs, and azb. I am not sure which one is correct. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm, interesting indeed. If you look at the examples here, you'll see we use double slashes after There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I don't know now. Maybe you can ask someone. |
||
`gs://mybucket/backups/backup1.backup` + | ||
`azb://mystorageaccount.blob/backupscontainer/backup1.backup` | ||
|=== | ||
|
||
Starting from Neo4j 2025.01, seed from URI can also be used in combination with `CREATE OR REPLACE DATABASE`. | ||
|
||
For more information about the seeding from URI functionality, refer to the xref::clustering/databases.adoc#cluster-seed-uri[Manage databases in a cluster -> Seed from URI] page. | ||
|
||
[[manage-databases-start]] | ||
== Start databases | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about using the Default label here. This is confusing. I think it will cause more questions than provide clarification.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the default value of the config starting from 2025.01 only. I don't think we need such details here.