Skip to content

Commit 90811fa

Browse files
Move the content on seed from URI to a new page (neo4j#2203) (neo4j#2242)
Co-authored-by: Reneta Popova <[email protected]>
1 parent ef12056 commit 90811fa

File tree

7 files changed

+243
-194
lines changed

7 files changed

+243
-194
lines changed

modules/ROOT/content-nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
** Standard databases
109109
*** xref:database-administration/standard-databases/naming-databases.adoc[]
110110
*** xref:database-administration/standard-databases/create-databases.adoc[]
111+
*** xref:database-administration/standard-databases/seed-from-uri.adoc[]
111112
*** xref:database-administration/standard-databases/listing-databases.adoc[]
112113
*** xref:database-administration/standard-databases/alter-databases.adoc[]
113114
*** xref:database-administration/standard-databases/delete-databases.adoc[]

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ See xref:clustering/monitoring/show-databases-monitoring.adoc#show-databases-mon
9292

9393
However, _restoring_ a database in a cluster is different since it is not known in advance how a database is going to be allocated to the servers in a cluster.
9494
This method relies on the seed already existing on one of the servers.
95-
The recommended way to restore a database in a cluster is to xref:clustering/databases.adoc#cluster-seed-uri[seed from URI].
95+
The recommended way to restore a database in a cluster is to xref::database-administration/standard-databases/seed-from-uri.adoc[seed from URI].
9696

9797
[NOTE]
9898
====

modules/ROOT/pages/clustering/databases.adoc

Lines changed: 7 additions & 189 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ See <<undefined-servers-backup, Undefined servers with fallback backup>> for mor
313313

314314
If you provide a URI to a backup or a dump, the stores on all allocations will be replaced by the backup or the dump at the given URI.
315315
The new allocations can be put on any `ENABLED` server in the cluster.
316-
See <<cluster-seed-uri, Seed from URI>> for more details.
316+
See xref::database-administration/standard-databases/seed-from-uri.adoc[Seed from URI] for more details.
317317

318318

319319
[source, shell]
@@ -385,9 +385,12 @@ CALL dbms.cluster.recreateDatabase("neo4j", {seedingServers: [], primaries: 3, s
385385
[[cluster-seed]]
386386
== Seed a cluster
387387

388-
There are two different ways to seed a cluster with data.
389-
The first option is to use a _designated seeder_, where a designated server is used to create a backed-up database on other servers in the cluster.
390-
The other options is to seed the cluster from URI, where all servers to host a database are seeded with an identical seed from an external source specified by the URI.
388+
There are two different ways to seed a cluster with data:
389+
390+
* The first option is to use a _designated seeder_, where a designated server is used to create a backed-up database on other servers in the cluster.
391+
* The other option is to seed the cluster from a URI, where all servers to host the database are seeded with an identical seed from an external source specified by that URI.
392+
For more details, see xref:database-administration/standard-databases/seed-from-uri.adoc[Create a database from a URI].
393+
391394
Keep in mind that using a designated seeder can be problematic in some situations as it is not known in advance how a database is going to be allocated to the servers in a cluster.
392395
Also, this method relies on the seed already existing on one of the servers.
393396

@@ -464,191 +467,6 @@ SHOW DATABASE foo;
464467
9 rows available after 3 ms, consumed after another 1 ms
465468
----
466469

467-
[[cluster-seed-uri]]
468-
=== Seed from URI
469-
470-
This method seeds all servers with an identical seed from an external source, specified by the URI.
471-
The seed can either be a full backup, a differential backup (xref:clustering/databases.adoc#cloud-seed-provider[`CloudSeedProvider`], introduced in Neo4j 5.26), or a dump from an existing database.
472-
The sources of seeds are called _seed providers_.
473-
474-
The mechanism is pluggable, allowing new sources of seeds to be supported (see link:https://www.neo4j.com/docs/java-reference/current/extending-neo4j/project-setup/#extending-neo4j-plugin-seed-provider[Java Reference -> Implement custom seed providers] for more information).
475-
The product has built-in support for seed from a mounted file system (file), FTP server, HTTP/HTTPS server, Amazon S3, Google Cloud Storage (from Neo4j 5.25), and Azure Cloud Storage (from Neo4j 5.25).
476-
477-
[NOTE]
478-
====
479-
Amazon S3, Google Cloud Storage, and Azure Cloud Storage are supported by default, but the other providers require configuration of xref:configuration/configuration-settings.adoc#config_dbms.databases.seed_from_uri_providers[`dbms.databases.seed_from_uri_providers`].
480-
====
481-
482-
The URI of the seed is specified when the `CREATE DATABASE` command is issued:
483-
484-
[source, cypher, role="noplay"]
485-
----
486-
CREATE DATABASE foo OPTIONS {existingData: 'use', seedURI:'s3://myBucket/myBackup.backup'}
487-
----
488-
489-
Download and validation of the seed is only performed as the new database is started.
490-
If it fails, the database is not available and it has the `statusMessage`: `Unable to start database` of the `SHOW DATABASES` command.
491-
492-
[source, cypher, role="noplay"]
493-
----
494-
neo4j@neo4j> SHOW DATABASES;
495-
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
496-
| name | type | aliases | access | address | role | writer | requestedStatus | currentStatus | statusMessage | default | home | constituents |
497-
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
498-
| "seed3" | "standard" | [] | "read-write" | "localhost:7682" | "unknown" | FALSE | "online" | "offline" | "Unable to start database `DatabaseId{3fe1a59b[seed3]}`" | FALSE | FALSE | [] |
499-
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
500-
----
501-
502-
To determine the cause of the problem, it is recommended to look at the `debug.log`.
503-
504-
[[file-seed-provider]]
505-
==== FileSeedProvider
506-
507-
label:new[Introduced in 5.26], the `FileSeedProvider` supports:
508-
509-
** `file:`
510-
511-
[[url-connection-seed-provider]]
512-
==== URLConnectionSeedProvider
513-
514-
The `URLConnectionSeedProvider` supports the following:
515-
516-
** `file:` label:deprecated[Deprecated in 5.26]
517-
** `ftp:`
518-
** `http:`
519-
** `https:`
520-
521-
[[cloud-seed-provider]]
522-
==== CloudSeedProvider
523-
524-
label:new[Introduced in 5.25], the `CloudSeedProvider` supports:
525-
526-
** `s3:`
527-
** `gs:`
528-
** `azb:`
529-
530-
Starting from Neo4j 5.26, the `CloudSeedProvider` supports using xref:backup-restore/modes.adoc#differential-backup[differential backup] files as seeds.
531-
With the provided differential backup file, the `CloudSeedProvider` searches the directory containing differential backup files for a xref:backup-restore/online-backup.adoc#backup-chain[backup chain] ending at the specified differential backup, and then seeds using this backup chain.
532-
533-
[.tabbed-example]
534-
=====
535-
[role=include-with-AWS-S3 label--new-5.25]
536-
======
537-
538-
include::partial$/aws-s3-overrides.adoc[]
539-
540-
include::partial$/aws-s3-credentials.adoc[]
541-
542-
. Create database from `myBackup.backup`.
543-
+
544-
[source,shell, role="nocopy"]
545-
----
546-
CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 's3://myBucket/myBackup.backup' }
547-
----
548-
549-
======
550-
[role=include-with-Google-cloud-storage label--new-5.25]
551-
======
552-
553-
include::partial$/gcs-credentials.adoc[]
554-
555-
. Create database from `myBackup.backup`.
556-
+
557-
[source,shell]
558-
----
559-
CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 'gs://myBucket/myBackup.backup' }
560-
----
561-
======
562-
[role=include-with-Azure-cloud-storage label--new-5.25]
563-
======
564-
565-
include::partial$/azb-credentials.adoc[]
566-
567-
. Create database from `myBackup.backup`.
568-
+
569-
[source,shell]
570-
----
571-
CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 'azb://myStorageAccount/myContainer/myBackup.backup' }
572-
----
573-
======
574-
=====
575-
576-
[[s3-seed-provider]]
577-
==== S3SeedProvider
578-
579-
The `S3SeedProvider` supports:
580-
581-
** `s3:` label:deprecated[Deprecated in 5.26]
582-
583-
584-
[NOTE]
585-
====
586-
Neo4j 5 comes bundled with necessary libraries for AWS S3 connectivity.
587-
Therefore, if you use `S3SeedProvider`,`aws cli` is not required but can be used with the `CloudSeedProvider`.
588-
====
589-
590-
The `S3SeedProvider` requires additional configuration.
591-
This is specified with the `seedConfig` option.
592-
This option expects a comma-separated list of configurations.
593-
Each configuration value is specified as a name followed by `=` and the value, as such:
594-
595-
[source, cypher, role="noplay"]
596-
----
597-
CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 's3://myBucket/myBackup.backup', seedConfig: 'region=eu-west-1' }
598-
----
599-
600-
`S3SeedProvider` also requires passing in credentials.
601-
These are specified with the `seedCredentials` option.
602-
Seed credentials are securely passed from the Cypher command to each server hosting the database.
603-
For this to work, Neo4j on each server in the cluster must be configured with identical keystores.
604-
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].
605-
If this configuration is not performed, the `seedCredentials` option fails.
606-
607-
[source, cypher, role="noplay"]
608-
----
609-
CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 's3://myBucket/myBackup.backup', seedConfig: 'region=eu-west-1', seedCredentials: [accessKey];[secretKey] }
610-
----
611-
Where `accessKey` and `secretKey` are provided by AWS.
612-
613-
614-
==== Seed provider reference
615-
616-
[cols="1,2,2",options="header"]
617-
|===
618-
| URL scheme
619-
| Seed provider
620-
| URI example
621-
622-
| `file:`
623-
| `URLConnectionSeedProvider` label:deprecated[Deprecated in 5.26], +
624-
`FileSeedProvider` label:new[Introduced in 5.26]
625-
| `file://tmp/backup1.backup`
626-
627-
| `ftp:`
628-
| `URLConnectionSeedProvider`
629-
| `ftp://myftp.com/backups/backup1.backup`
630-
631-
| `http:`
632-
| `URLConnectionSeedProvider`
633-
| `\http://myhttp.com/backups/backup1.backup`
634-
635-
| `https:`
636-
| `URLConnectionSeedProvider`
637-
| `\https://myhttp.com/backups/backup1.backup`
638-
639-
| `s3:`
640-
| `S3SeedProvider` label:deprecated[Deprecated in 5.26], +
641-
`CloudSeedProvider` label:new[Introduced in 5.25]
642-
| `s3://mybucket/backups/backup1.backup`
643-
644-
| `gs:`
645-
| `CloudSeedProvider` label:new[Introduced in 5.25]
646-
| `gs://mybucket/backups/backup1.backup`
647-
648-
| `azb:`
649-
| `CloudSeedProvider` label:new[Introduced in 5.25]
650-
| `azb://mystorageaccount.blob/backupscontainer/backup1.backup`
651-
|===
652470

653471
[[cluster-allow-deny-db]]
654472
== Controlling locations with allowed/denied databases

modules/ROOT/pages/configuration/configuration-settings.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2283,7 +2283,7 @@ The following values are available: `S3SeedProvider`, `CloudSeedProvider`, `URLC
22832283
This list specifies enabled seed providers.
22842284
If a seed source (URI scheme) is supported by multiple providers in the list, the first matching provider will be used.
22852285
If the list is set to empty, the seed from URI functionality is effectively disabled.
2286-
See xref:/clustering/databases.adoc#cluster-seed-uri[Seed from URI] for more information.
2286+
See xref::database-administration/standard-databases/seed-from-uri.adoc[Seed from a URI] for more information.
22872287
|Valid values
22882288
a|A comma-separated list where each element is a string.
22892289
|Default value

modules/ROOT/pages/database-administration/standard-databases/create-databases.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,18 +92,19 @@ The server ID can be found in the `serverId` column after running `SHOW SERVERS`
9292
| URI to a backup or a dump from an existing database.
9393
|
9494
Defines an identical seed from an external source which will be used to seed all servers.
95+
For more information, see xref::database-administration/standard-databases/seed-from-uri.adoc[Seed from a URI].
9596

9697
| `seedConfig`
9798
| Comma-separated list of configuration values.
9899
|
99-
For more information see xref::clustering/databases.adoc#cluster-seed-uri[Seed from URI].
100100

101101
| `seedCredentials` label:deprecated[Deprecated in 5.26]
102102
| credentials
103103
|
104104
Defines credentials that need to be passed into certain seed providers.
105+
105106
From 5.26, it is recommended to use the `CloudSeedProvider` seed provider, which does not require this configuration when seeding from cloud storage.
106-
For more information see xref::clustering/databases.adoc#cloud-seed-provider[CloudSeedProvider].
107+
For more information see xref::database-administration/standard-databases/seed-from-uri.adoc#cloud-seed-provider[CloudSeedProvider].
107108

108109
| `txLogEnrichment`
109110
| `FULL` \| `DIFF` \| `OFF`

modules/ROOT/pages/database-administration/standard-databases/delete-databases.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ DROP DATABASE movies DUMP DATA
8686
----
8787

8888
In Neo4j, dumps can be stored in the directory specified by the xref:configuration/configuration-settings.adoc#config_server.directories.dumps.root[`server.directories.dumps.root`] setting (by default, the path for storing dumps is xref:configuration/file-locations.adoc#data[`<neo4j-home>/data/dumps`]).
89-
You can use dumps to create databases through the xref:clustering/databases.adoc#cluster-seed-uri[Seed from URI approach].
89+
You can use dumps to create databases using the xref::database-administration/standard-databases/seed-from-uri.adoc[seed from a URI] approach.
9090

9191
The option `DESTROY DATA` explicitly requests the default behavior of the command.
9292

0 commit comments

Comments
 (0)