Skip to content

Commit dc9e5a6

Browse files
committed
Fix the restore metadata paths (#2498)
1 parent 0a0e988 commit dc9e5a6

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

modules/ROOT/pages/authentication-authorization/manage-users.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ The `'password'` can either be a string value or a string parameter with default
786786
The `PLAINTEXT` and `ENCRYPTED` keywords are optional and can be used to specify the format of the password, i.e. whether Neo4j needs to hash it or it has already been hashed.
787787
By default, all passwords are encrypted (hashed) when stored in the Neo4j `system` database.
788788
* The optional `PLAINTEXT` in `SET PLAINTEXT PASSWORD` has the same behavior as `SET PASSWORD`.
789-
* The optional `ENCRYPTED` is used to recreate an existing user when the plaintext password is unknown, but the encrypted password is available in the _data/databases/databasename/tools/metadata_script.cypher_ file of a database backup.
789+
* The optional `ENCRYPTED` is used to recreate an existing user when the plaintext password is unknown, but the encrypted password is available in the _/data/scripts/databasename/restore_metadata.cypher_ file of restored database backup.
790790
See xref:backup-restore/restore-backup#_restore_users_and_roles_metadata[Restore users and roles metadata]. +
791791
With `ENCRYPTED`, the password string is expected to be in the format of `<encryption-version>,<hash>,<salt>`, where, for example:
792792
** `0` is the first version and refers to the `SHA-256` cryptographic hash function with iterations `1`.
@@ -855,7 +855,7 @@ SET AUTH 'native' {SET PASSWORD 'abcd1234' SET PASSWORD CHANGE REQUIRED}
855855

856856
.Create user with an encrypted password
857857
======
858-
Or you can create the user `Jake` in an active state, with an encrypted password (taken from the _data/databases/databasename/tools/metadata_script.cypher_ of a database backup), and the requirement to not change the password by running:
858+
Or you can create the user `Jake` in an active state, with an encrypted password (taken from the _/data/scripts/databasename/restore_metadata.cypher_ of a restored database backup), and the requirement to not change the password by running:
859859
860860
[source,cypher,role=noplay]
861861
----
@@ -1014,7 +1014,7 @@ The `'password'` can either be a string value or a string parameter with default
10141014
The `PLAINTEXT` and `ENCRYPTED` keywords are optional and can be used to specify the format of the password, i.e. whether Neo4j needs to hash it or it has already been hashed.
10151015
By default, all passwords are encrypted (hashed) when stored in the Neo4j `system` database.
10161016
* The optional `PLAINTEXT` in `SET PLAINTEXT PASSWORD` has the same behavior as `SET PASSWORD`.
1017-
* The optional `ENCRYPTED` is used to recreate an existing user when the plaintext password is unknown, but the encrypted password is available in the _data/databases/databasename/tools/metadata_script.cypher_ file of a database backup.
1017+
* The optional `ENCRYPTED` is used to recreate an existing user when the plaintext password is unknown, but the encrypted password is available in the _/data/scripts/databasename/restore_metadata.cypher_ file when you restore a database backup.
10181018
See xref:backup-restore/restore-backup#_restore_users_and_roles_metadata[Restore users and roles metadata]. +
10191019
With `ENCRYPTED`, the password string is expected to be in the format of `<encryption-version>,<hash>,<salt>`, where, for example:
10201020
** `0` is the first version and refers to the `SHA-256` cryptographic hash function with iterations `1`.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,16 +295,16 @@ For more information, see xref:clustering/databases.adoc#cluster-seed[Designated
295295

296296
If you have backed up a database with the option `--include-metadata`, you can manually restore the users and roles metadata.
297297

298-
From the _<NEO4J_HOME>_ directory, you run the Cypher script _data/databases/databasename/tools/metadata_script.cypher_, which the `neo4j-admin database restore` command outputs, using xref:tools/cypher-shell.adoc[Cypher Shell]:
298+
From the _<NEO4J_HOME>_ directory, you run the Cypher script _/data/scripts/databasename/restore_metadata.cypher_, which the `neo4j-admin database restore` command outputs, using xref:tools/cypher-shell.adoc[]:
299299

300300
*Using `cat` (UNIX)*
301301
[source, shell, role=nocopy noplay]
302302
----
303-
cat data/databases/databasename/tools/metadata_script.cypher | bin/cypher-shell -u user -p password -a ip_address:port -d system --param "database => 'databasename'"
303+
cat ../data/scripts/databasename/restore_metadata.cypher | bin/cypher-shell -u user -p password -a ip_address:port -d system --param "database => 'databasename'"
304304
----
305305

306306
*Using `type` (Windows)*
307307
[source, shell, role=nocopy noplay]
308308
----
309-
type data\databases\databasename\tools\metadata_script.cypher | bin\cypher-shell.bat -u user -p password -a ip_address:port -d system --param "database => 'databasename'"
309+
type ..\data\scripts\databasename\restore_metadata.cypher | bin\cypher-shell.bat -u user -p password -a ip_address:port -d system --param "database => 'databasename'"
310310
----

modules/ROOT/pages/database-internals/store-formats.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,14 +200,16 @@ For example:
200200
----
201201
@system> ALTER DATABASE mydb SET ACCESS READ ONLY;
202202
----
203-
. In your command-line tool, back up that database using the xref:backup-restore/online-backup.adoc[`neo4j-admin database backup`] command.
203+
. In your command-line tool, back up that database using the xref:backup-restore/online-backup.adoc[`neo4j-admin database backup`] command with the `--include-metadata=all` option to include all users and roles associated with it.
204204
For example:
205205
+
206206
[source,shell]
207207
----
208208
bin/neo4j-admin database backup mydb --to-path=/path/to/your-backup-folder --include-metadata=all
209209
----
210-
. Back in Cypher Shell, drop the database to delete it and all users and roles associated with it:
210+
+
211+
The command creates a backup archive that contains both the database and the metadata associated with it.
212+
. In Cypher Shell, drop the database to delete it and all users and roles associated with it:
211213
+
212214
[source,cypher]
213215
----

0 commit comments

Comments
 (0)