Skip to content

Conversation

@NataliaIvakina
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@renetapopova renetapopova left a comment

Choose a reason for hiding this comment

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

Thanks, @NataliaIvakina. I added some suggestions, but I might need to review it again and also check all mentions of --include-metadata in the manual.

----
====

The `neo4j-admin database backup` command with the `--type=full` argument creates a xref:backup-restore/online-backup.adoc#backup-artifact[full backup artifact] file in the format of _<databasename><timestamp>.backup_, called in the target location (`--to-path`).
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
The `neo4j-admin database backup` command with the `--type=full` argument creates a xref:backup-restore/online-backup.adoc#backup-artifact[full backup artifact] file in the format of _<databasename><timestamp>.backup_, called in the target location (`--to-path`).
The `neo4j-admin database backup full` command with the `--type=full` argument creates a xref:backup-restore/online-backup.adoc#backup-artifact[full backup artifact] file in the format of _<databasename><timestamp>.backup_, called in the target location (`--to-path`).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Where do we mention the neo4j-admin database backup full command? Do we have it in the code?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we have ... import full and ... import incremental. But we don't have ... backup full or ... backup differential commands.


The `neo4j-admin database backup` command with the `--type=full` argument creates a xref:backup-restore/online-backup.adoc#backup-artifact[full backup artifact] file in the format of _<databasename><timestamp>.backup_, called in the target location (`--to-path`).

The `neo4j-admin database backup` command allows you to include metadata, enabling the backup to store the role-based access control (RBAC) settings associated with the database.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
The `neo4j-admin database backup` command allows you to include metadata, enabling the backup to store the role-based access control (RBAC) settings associated with the database.
By default, the backup file also contains the users and roles metadata associated with the database.
You can change whether you want it to be included or not using the argument `--include-metadata`.

====

The `neo4j-admin database backup` command with the `--type=full` argument creates a xref:backup-restore/online-backup.adoc#backup-artifact[full backup artifact] file in the format of _<databasename><timestamp>.backup_, called in the target location (`--to-path`).

Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change


The `neo4j-admin database dump` command creates a single-file archive, that follows the format _<databasename><timestamp>.dump_, and stores it in the xref:configuration/file-locations.adoc#data[_<NEO4J_HOME>/data_] directory.

Note that when using `neo4j-admin database dump`, only the database contents are backed up; database metadata and associated RBAC settings are not included.
Copy link
Collaborator

@renetapopova renetapopova Dec 18, 2025

Choose a reason for hiding this comment

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

What are these RBAC settings? Also, I think we need to find all places where we mention --include-metadata and update them accordingly, as by default the backup command backs up all users and roles, unless you specified something different from the default all.

Suggested change
Note that when using `neo4j-admin database dump`, only the database contents are backed up; database metadata and associated RBAC settings are not included.
Note that the dump archive contains only the database contents without the associated users and roles metadata.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

RBAC settings are privileges assigned to the users' roles (on the database level), and you can back up users' roles and their privileges by specifying --include-metadata in your backup command. It is possible to use just --include-metadata (then the default value is all) or to define what to back up:

  • roles - include commands to create the roles and privileges (for both database and graph) that affect the use of the database.

  • users - include commands to create the users that can use the database and their role assignments. If a list of users is specified (e.g. users=alice,bob,charlie), only those users are included in the backup.

The Cypher script will be created with users roles and privileges, or RBAC settings associated with the database.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

====
By default, a database backup includes only the database contents.
If you choose to include metadata, the backup also stores the role-based access control (RBAC) settings associated with the database.
In the Enterprise edition, the `neo4j-admin database backup` command also allows you to include metadata, enabling the backup to store the role-based access control (RBAC) settings associated with the database.
Copy link
Collaborator

Choose a reason for hiding this comment

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

It backs the metadata by default. Actually, it allows you to not include it if you want. Also, I'm not sure what we meant by settings "? I added a suggestion for the above sentence.

Suggested change
In the Enterprise edition, the `neo4j-admin database backup` command also allows you to include metadata, enabling the backup to store the role-based access control (RBAC) settings associated with the database.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Where do we say that that metadata is backed up by default?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

See https://neo4j.com/docs/operations-manual/current/backup-restore/restore-backup/#_restore_users_and_roles_metadata.
It says If you have backed up a database with the option --include-metadata, you can manually restore the users and roles metadata.
I assume it means you must include the option --include-metadata into your backup command. Without this option, the backup file doesn't contain file with users and their roles.


[IMPORTANT]
====
By default, a database backup includes only the database contents.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
By default, a database backup includes only the database contents.
By default, when backing up a database using the `neo4j-admin database backup` command (Enterprise edition), the backup archive includes both the database contents and the users and roles metadata.
You can control whether you want to include the users, roles, all, or none using the argument xref:backup-restore/online-backup.adoc#backup-command-options[`--include-metadata`].

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I might be wrong, but you have to specify --include-metadata if you want to back up users' roles and privileges (on a database level). If you use just --include-metadata, the default value is all meaning that both users and roles are included. But anyway you have to include --include-metadata flag in your backup command. If you just run bin/neo4j-admin database backup --to-path=/path/to/backups/neo4j neo4j, no metadata is included.

@neo4j-docops-agent
Copy link
Collaborator

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.

3 participants