Skip to content

Commit 9cc7f20

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

File tree

7 files changed

+242
-230
lines changed

7 files changed

+242
-230
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 & 225 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ See <<undefined-servers-backup, Undefined servers with fallback backup>> for mor
299299

300300
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.
301301
The new allocations can be put on any `ENABLED` server in the cluster.
302-
See <<cluster-seed-uri, Seed from URI>> for more details.
302+
See xref::database-administration/standard-databases/seed-from-uri.adoc[Seed from URI] for more details.
303303

304304

305305
[source, shell]
@@ -371,9 +371,12 @@ CALL dbms.cluster.recreateDatabase("neo4j", {seedingServers: [], primaries: 3, s
371371
[[cluster-seed]]
372372
== Seed a cluster
373373

374-
There are two different ways to seed a cluster with data.
375-
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.
376-
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.
374+
There are two different ways to seed a cluster with data:
375+
376+
* 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.
377+
* 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.
378+
For more details, see xref:database-administration/standard-databases/seed-from-uri.adoc[Create a database from a URI].
379+
377380
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.
378381
Also, this method relies on the seed already existing on one of the servers.
379382

@@ -450,227 +453,6 @@ SHOW DATABASE foo;
450453
9 rows available after 3 ms, consumed after another 1 ms
451454
----
452455

453-
[[cluster-seed-uri]]
454-
=== Seed from URI
455-
456-
This method seeds all servers with an identical seed from an external source, specified by the URI.
457-
The seed can either be a full backup, a differential backup (see xref:clustering/databases.adoc#cloud-seed-provider[`CloudSeedProvider`]), or a dump from an existing database.
458-
The sources of seeds are called _seed providers_.
459-
460-
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).
461-
The product has built-in support for seed from a mounted file system (file), FTP server, HTTP/HTTPS server, Amazon S3, Google Cloud Storage, and Azure Cloud Storage.
462-
463-
[NOTE]
464-
====
465-
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`].
466-
====
467-
468-
The URI of the seed is specified when the `CREATE DATABASE` command is issued:
469-
470-
[source, cypher, role="noplay"]
471-
----
472-
CREATE DATABASE foo OPTIONS {existingData: 'use', seedURI:'s3://myBucket/myBackup.backup'}
473-
----
474-
475-
Download and validation of the seed is only performed as the new database is started.
476-
If it fails, the database is not available and it has the `statusMessage`: `Unable to start database` of the `SHOW DATABASES` command.
477-
478-
[source, cypher, role="noplay"]
479-
----
480-
neo4j@neo4j> SHOW DATABASES;
481-
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
482-
| name | type | aliases | access | address | role | writer | requestedStatus | currentStatus | statusMessage | default | home | constituents |
483-
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
484-
| "seed3" | "standard" | [] | "read-write" | "localhost:7682" | "unknown" | FALSE | "online" | "offline" | "Unable to start database `DatabaseId{3fe1a59b[seed3]}`" | FALSE | FALSE | [] |
485-
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
486-
----
487-
488-
To determine the cause of the problem, it is recommended to look at the `debug.log`.
489-
490-
[NOTE]
491-
====
492-
Starting from Neo4j 2025.01, seed from URI can also be used in combination with xref:database-administration/standard-databases/create-databases.adoc[`CREATE OR REPLACE DATABASE`].
493-
====
494-
495-
496-
[[file-seed-provider]]
497-
==== FileSeedProvider
498-
499-
The `FileSeedProvider` supports:
500-
501-
** `file:`
502-
503-
[[url-connection-seed-provider]]
504-
==== URLConnectionSeedProvider
505-
506-
The `URLConnectionSeedProvider` supports the following:
507-
508-
** `ftp:`
509-
** `http:`
510-
** `https:`
511-
512-
Starting from Neo4j 2025.01, the `URLConnectionSeedProvider` does not support `file`.
513-
// This is true for both Cypher 5 and Cypher 25.
514-
515-
[[cloud-seed-provider]]
516-
==== CloudSeedProvider
517-
518-
The `CloudSeedProvider` supports:
519-
520-
** `s3:`
521-
** `gs:`
522-
** `azb:`
523-
524-
The `CloudSeedProvider` supports using xref:backup-restore/modes.adoc#differential-backup[differential backup] files as seeds.
525-
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.
526-
527-
[.tabbed-example]
528-
=====
529-
[role=include-with-AWS-S3]
530-
======
531-
532-
include::partial$/aws-s3-overrides.adoc[]
533-
534-
include::partial$/aws-s3-credentials.adoc[]
535-
536-
. Create database from `myBackup.backup`.
537-
+
538-
[source,shell, role="nocopy"]
539-
----
540-
CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 's3://myBucket/myBackup.backup' }
541-
----
542-
543-
======
544-
[role=include-with-Google-cloud-storage]
545-
======
546-
547-
include::partial$/gcs-credentials.adoc[]
548-
549-
. Create database from `myBackup.backup`.
550-
+
551-
[source,shell]
552-
----
553-
CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 'gs://myBucket/myBackup.backup' }
554-
----
555-
======
556-
[role=include-with-Azure-cloud-storage]
557-
======
558-
559-
include::partial$/azb-credentials.adoc[]
560-
561-
. Create database from `myBackup.backup`.
562-
+
563-
[source,shell]
564-
----
565-
CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 'azb://myStorageAccount/myContainer/myBackup.backup' }
566-
----
567-
======
568-
=====
569-
570-
Starting from Neo4j 2025.01, the `CloudSeedProvider` supports seeding up to a specific date or transaction ID using the `seedRestoreUntil` option.
571-
572-
[role=label--new-2025.01]
573-
Seed up to a specific date::
574-
575-
To seed up to a specific date, you need to pass the differential backup, which contains the data up to that date.
576-
+
577-
[source,shell]
578-
----
579-
CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 's3://myBucket/myBackup.backup', seedRestoreUntil: datetime("2019-06-01T18:40:32.142+0100") }
580-
----
581-
+
582-
This will seed the database with transactions committed before the provided timestamp.
583-
584-
[role=label--new-2025.01]
585-
Seed up to a specific transaction ID::
586-
587-
To seed up to a specific transaction ID, you need to pass the differential backup that contains the data up to that transaction ID.
588-
+
589-
[source,shell]
590-
----
591-
CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 's3://myBucket/myBackup.backup', seedRestoreUntil: 123 }
592-
----
593-
+
594-
This will seed the database with transactions up to, but not including transaction 123.
595-
596-
[role=label--deprecated]
597-
[[s3-seed-provider]]
598-
==== S3SeedProvider
599-
600-
// When Cypher 25 is released, we have to label this section 'Cypher 5' as this functionality is only available in Cypher 5.
601-
602-
The `S3SeedProvider` supports:
603-
604-
** `s3:` label:deprecated[Deprecated in 5.26]
605-
606-
607-
[NOTE]
608-
====
609-
Neo4j comes bundled with necessary libraries for AWS S3 connectivity.
610-
Therefore, if you use `S3SeedProvider`,`aws cli` is not required but can be used with the `CloudSeedProvider`.
611-
====
612-
613-
The `S3SeedProvider` requires additional configuration.
614-
This is specified with the `seedConfig` option.
615-
This option expects a comma-separated list of configurations.
616-
Each configuration value is specified as a name followed by `=` and the value, as such:
617-
618-
[source, cypher, role="noplay"]
619-
----
620-
CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 's3://myBucket/myBackup.backup', seedConfig: 'region=eu-west-1' }
621-
----
622-
623-
`S3SeedProvider` also requires passing in credentials.
624-
These are specified with the `seedCredentials` option.
625-
Seed credentials are securely passed from the Cypher command to each server hosting the database.
626-
For this to work, Neo4j on each server in the cluster must be configured with identical keystores.
627-
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].
628-
If this configuration is not performed, the `seedCredentials` option fails.
629-
630-
[source, cypher, role="noplay"]
631-
----
632-
CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 's3://myBucket/myBackup.backup', seedConfig: 'region=eu-west-1', seedCredentials: [accessKey];[secretKey] }
633-
----
634-
Where `accessKey` and `secretKey` are provided by AWS.
635-
636-
==== Seed provider reference
637-
638-
[cols="1,2,2",options="header"]
639-
|===
640-
| URL scheme
641-
| Seed provider
642-
| URI example
643-
644-
| `file:`
645-
| `FileSeedProvider`
646-
| `file://tmp/backup1.backup`
647-
648-
| `ftp:`
649-
| `URLConnectionSeedProvider`
650-
| `ftp://myftp.com/backups/backup1.backup`
651-
652-
| `http:`
653-
| `URLConnectionSeedProvider`
654-
| `\http://myhttp.com/backups/backup1.backup`
655-
656-
| `https:`
657-
| `URLConnectionSeedProvider`
658-
| `\https://myhttp.com/backups/backup1.backup`
659-
660-
| `s3:`
661-
| `S3SeedProvider` label:deprecated[Deprecated in 5.26], +
662-
`CloudSeedProvider`
663-
| `s3://mybucket/backups/backup1.backup`
664-
665-
| `gs:`
666-
| `CloudSeedProvider`
667-
| `gs://mybucket/backups/backup1.backup`
668-
669-
| `azb:`
670-
| `CloudSeedProvider`
671-
| `azb://mystorageaccount.blob/backupscontainer/backup1.backup`
672-
|===
673-
674456
[[cluster-allow-deny-db]]
675457
== Controlling locations with allowed/denied databases
676458

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

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

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,18 +91,18 @@ Replaced by `existingDataSeedServer`.
9191
| URI to a backup or a dump from an existing database.
9292
|
9393
Defines an identical seed from an external source which will be used to seed all servers.
94+
For more information, see xref::database-administration/standard-databases/seed-from-uri.adoc[Seed from a URI].
9495

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

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

107107
| `txLogEnrichment`
108108
| `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)