From 1aea8b051947b16e1ed08828a7eecf916bc7a0c2 Mon Sep 17 00:00:00 2001 From: Natalia Ivakina Date: Wed, 17 Dec 2025 13:26:37 +0100 Subject: [PATCH 1/6] Clarify that dump cmd does not support backing up db metadata --- modules/ROOT/pages/backup-restore/index.adoc | 10 +++--- modules/ROOT/pages/backup-restore/modes.adoc | 34 ++++++++++++------- .../pages/backup-restore/offline-backup.adoc | 5 ++- .../pages/backup-restore/online-backup.adoc | 8 ++--- .../ROOT/pages/backup-restore/planning.adoc | 2 +- 5 files changed, 35 insertions(+), 24 deletions(-) diff --git a/modules/ROOT/pages/backup-restore/index.adoc b/modules/ROOT/pages/backup-restore/index.adoc index 87470ae88..5c3bee4fd 100644 --- a/modules/ROOT/pages/backup-restore/index.adoc +++ b/modules/ROOT/pages/backup-restore/index.adoc @@ -6,14 +6,14 @@ This chapter describes the following: * xref:backup-restore/planning.adoc[Backup and restore planning] -- What to consider when designing your backup and restore strategy. * xref:backup-restore/modes.adoc[Backup modes] -- The supported backup modes. -* xref:backup-restore/online-backup.adoc[Back up an online database] -- How to back up an online database. -* xref:backup-restore/aggregate.adoc[Aggregate a database backup chain] - How to aggregate a backup chain into a single backup. -* xref:backup-restore/inspect.adoc[Inspect the metadata of a database backup file] -- How to inspect the metadata of a database backup file. +* label:enterprise[Enterprise Edition] xref:backup-restore/online-backup.adoc[Back up an online database] -- How to back up an online database. +* label:enterprise[Enterprise Edition] xref:backup-restore/aggregate.adoc[Aggregate a database backup chain] - How to aggregate a backup chain into a single backup. +* label:enterprise[Enterprise Edition] xref:backup-restore/inspect.adoc[Inspect the metadata of a database backup file] -- How to inspect the metadata of a database backup file. * xref:backup-restore/consistency-checker.adoc[Check database consistency] -- How to check the consistency of a database, backup, or a dump. -* xref:backup-restore/restore-backup.adoc[Restore a database backup] -- How to restore a database backup in a live Neo4j deployment. +* label:enterprise[Enterprise Edition] xref:backup-restore/restore-backup.adoc[Restore a database backup] -- How to restore a database backup in a live Neo4j deployment. * xref:backup-restore/offline-backup.adoc[Back up an offline database] -- How to back up an offline database. * xref:backup-restore/restore-dump.adoc[Restore a database dump] -- How to restore a database dump in a live Neo4j deployment. -* xref:backup-restore/copy-database.adoc[Copy a database store] -- How to copy data store from an existing database to a new database. +* label:enterprise[Enterprise Edition] xref:backup-restore/copy-database.adoc[Copy a database store] -- How to copy data store from an existing database to a new database. //* <> //* <> //* <> diff --git a/modules/ROOT/pages/backup-restore/modes.adoc b/modules/ROOT/pages/backup-restore/modes.adoc index f1105bb9c..843aa5afd 100644 --- a/modules/ROOT/pages/backup-restore/modes.adoc +++ b/modules/ROOT/pages/backup-restore/modes.adoc @@ -2,19 +2,20 @@ [[backup-modes]] = Backup modes -The backup client can operate in two different modes – a _full backup_ and an _differential backup_. +The backup client can operate in two different modes – a _full backup_ and a _differential backup_. [[full-backup]] == Full backup A full backup is always required initially for the very first backup into a target location. -[NOTE] -==== -The full backup can be run against both an *online* (using `neo4j-admin database backup`) and an *offline* (using `neo4j-admin database dump`) database. -==== +The full backup can be run against an *online* (using the Enterprise edition command -- `neo4j-admin database backup`) and an *offline* (using `neo4j-admin database dump`) database. + + +[role=enterprise-edition] +=== `neo4j-admin database backup` -.Full backup against an online database +.Backing up an online database ==== [source,shell,role=nocopy] ---- @@ -31,21 +32,29 @@ Doing full backup... ... ---- ==== + +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 _.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. + For more information about online backup options and how to control memory usage, see xref:backup-restore/online-backup.adoc[Back up an online database]. -[NOTE] -==== -A full online database backup creates a xref:backup-restore/online-backup.adoc#backup-artifact[full backup artifact] in the target location (`--to-path`). -==== + +=== `neo4j-admin database dump` + +The `neo4j-admin database dump` command creates a single-file archive, that follows the format _.dump_, and stores it in the xref:configuration/file-locations.adoc#data[_/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. For more information about performing a full backup against an *offline* database, see xref:backup-restore/offline-backup.adoc[Back up an offline database]. +[role=enterprise-edition] [[differential-backup]] == Differential backup - -In the online backup version, after the initial full backup, the subsequent backups attempt to use the differential mode, where just the delta of the transaction logs since the last backup are transferred and used to create a differential backup artifact (stored in the target location). Those differential backup artifacts form a xref:backup-restore/online-backup.adoc#backup-chain[backup chain]. +In the online backup version, after the initial full backup, the subsequent backups attempt to use the differential mode, where just the delta of the transaction logs since the last backup are transferred and used to create a differential backup artifact (stored in the target location). +Those differential backup artifacts form a xref:backup-restore/online-backup.adoc#backup-chain[backup chain]. If the required transaction logs are not available on the backup server, then the backup client falls back on performing a full backup instead. @@ -60,4 +69,3 @@ Backup complete. ---- ==== -For more information about online backup options and how to control memory usage, see xref:backup-restore/online-backup.adoc[Back up an online database]. diff --git a/modules/ROOT/pages/backup-restore/offline-backup.adoc b/modules/ROOT/pages/backup-restore/offline-backup.adoc index 79805efed..bf8b8bcf6 100644 --- a/modules/ROOT/pages/backup-restore/offline-backup.adoc +++ b/modules/ROOT/pages/backup-restore/offline-backup.adoc @@ -12,7 +12,9 @@ Remember to xref:backup-restore/planning.adoc[plan your backup] carefully and ba == Command The `neo4j-admin database dump` command can be used for performing a full backup of an **offline** database. -It dumps a database into a single-file archive, called _.dump_, and stores it in the xref:configuration/file-locations.adoc#data[_/data_] directory. +It dumps only a database content into a single-file archive, called _.dump_, and stores it in the xref:configuration/file-locations.adoc#data[_/data_] directory. +Note that the `neo4j-admin database dump` command **does not** support backing up database metadata. + Alternatively, `neo4j-admin database dump` can stream dump to standard output, enabling the output to be piped to another program, for example to `neo4j-admin database load`. If the database is hosted in a cluster, make sure that the database is stopped on the server you are connected to. @@ -20,6 +22,7 @@ The command can be run only locally from an online or an offline Neo4j DBMS on E On Community Edition, the command can be run only on an offline Neo4j DBMS. It does not support SSL/TLS. + [[offline-command-syntax]] === Syntax diff --git a/modules/ROOT/pages/backup-restore/online-backup.adoc b/modules/ROOT/pages/backup-restore/online-backup.adoc index a4713b3a4..3b40b204d 100644 --- a/modules/ROOT/pages/backup-restore/online-backup.adoc +++ b/modules/ROOT/pages/backup-restore/online-backup.adoc @@ -1,5 +1,5 @@ :description: This section describes how to back up an online database. -[role=enterprise-edition] +[role=enterprise-edition not-on-aura] [[online-backup]] = Back up an online database @@ -434,7 +434,7 @@ bin/neo4j-admin database backup --to-path=/path/to/backups/neo4j neo4j ---- -=== Perform a forced full backup of a single database. +=== Perform a forced full backup of a single database If you want to force a full backup after several differential backups, you can use the `--type=full` option. @@ -446,8 +446,8 @@ bin/neo4j-admin database backup --type=full --to-path=/path/to/backups/neo4j neo === Back up multiple databases -To back up several databases that match database a pattern you can use name globbing. -For example, to backup all databases that start with *n* from your three-node cluster, run: +To back up multiple databases that match a name pattern, you can use name globbing. +For example, to backup all databases that start with *n* in your three-server cluster, run: [source, shell,role=nocopy noplay] ---- diff --git a/modules/ROOT/pages/backup-restore/planning.adoc b/modules/ROOT/pages/backup-restore/planning.adoc index f801fd242..9eb2fe3ce 100644 --- a/modules/ROOT/pages/backup-restore/planning.adoc +++ b/modules/ROOT/pages/backup-restore/planning.adoc @@ -193,7 +193,7 @@ The recommended way to restore a database in a cluster is to xref::database-admi [IMPORTANT] ==== 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. When restoring, you have the flexibility to define the target topology (how many primaries and secondaries are desired for the database), which may differ from the topology at backup time. The database will then be allocated across the available servers according to that topology. From df503540366149480edc94ca998145300c4fe3fe Mon Sep 17 00:00:00 2001 From: Natalia Ivakina <82437520+NataliaIvakina@users.noreply.github.com> Date: Fri, 19 Dec 2025 09:45:39 +0100 Subject: [PATCH 2/6] Apply suggestion from @renetapopova Co-authored-by: Reneta Popova --- modules/ROOT/pages/backup-restore/modes.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/backup-restore/modes.adoc b/modules/ROOT/pages/backup-restore/modes.adoc index 843aa5afd..54a5397c1 100644 --- a/modules/ROOT/pages/backup-restore/modes.adoc +++ b/modules/ROOT/pages/backup-restore/modes.adoc @@ -33,7 +33,7 @@ Doing full backup... ---- ==== -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 _.backup_, called in the target location (`--to-path`). +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 _.backup_, in the target location specified by `--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. From f03c23c9e27f2f7294e61fd25463270a8a275b76 Mon Sep 17 00:00:00 2001 From: Natalia Ivakina <82437520+NataliaIvakina@users.noreply.github.com> Date: Fri, 19 Dec 2025 10:28:52 +0100 Subject: [PATCH 3/6] Update offline-backup.adoc --- modules/ROOT/pages/backup-restore/offline-backup.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/backup-restore/offline-backup.adoc b/modules/ROOT/pages/backup-restore/offline-backup.adoc index bf8b8bcf6..2081c0e13 100644 --- a/modules/ROOT/pages/backup-restore/offline-backup.adoc +++ b/modules/ROOT/pages/backup-restore/offline-backup.adoc @@ -12,7 +12,7 @@ Remember to xref:backup-restore/planning.adoc[plan your backup] carefully and ba == Command The `neo4j-admin database dump` command can be used for performing a full backup of an **offline** database. -It dumps only a database content into a single-file archive, called _.dump_, and stores it in the xref:configuration/file-locations.adoc#data[_/data_] directory. +It dumps only the database content into a single-file archive, called _.dump_, and stores it in the xref:configuration/file-locations.adoc#data[_/data_] directory. Note that the `neo4j-admin database dump` command **does not** support backing up database metadata. Alternatively, `neo4j-admin database dump` can stream dump to standard output, enabling the output to be piped to another program, for example to `neo4j-admin database load`. From 39ec57c7d9acb3e1b3c6b3b013363ef3d0f371d3 Mon Sep 17 00:00:00 2001 From: Natalia Ivakina <82437520+NataliaIvakina@users.noreply.github.com> Date: Fri, 19 Dec 2025 10:39:56 +0100 Subject: [PATCH 4/6] Update modes.adoc --- modules/ROOT/pages/backup-restore/modes.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/backup-restore/modes.adoc b/modules/ROOT/pages/backup-restore/modes.adoc index 54a5397c1..8b2b77b58 100644 --- a/modules/ROOT/pages/backup-restore/modes.adoc +++ b/modules/ROOT/pages/backup-restore/modes.adoc @@ -53,7 +53,7 @@ For more information about performing a full backup against an *offline* databas [[differential-backup]] == Differential backup -In the online backup version, after the initial full backup, the subsequent backups attempt to use the differential mode, where just the delta of the transaction logs since the last backup are transferred and used to create a differential backup artifact (stored in the target location). +In the online backup version, after the initial full backup, subsequent backups attempt to use differential mode, where only the delta of the transaction logs since the last backup is transferred and used to create a differential backup artifact (stored in the target location). Those differential backup artifacts form a xref:backup-restore/online-backup.adoc#backup-chain[backup chain]. If the required transaction logs are not available on the backup server, then the backup client falls back on performing a full backup instead. From b79f45ae6a10b03e585a1c4b44d5fa53e597daa5 Mon Sep 17 00:00:00 2001 From: Natalia Ivakina <82437520+NataliaIvakina@users.noreply.github.com> Date: Fri, 19 Dec 2025 10:52:26 +0100 Subject: [PATCH 5/6] Update modes.adoc --- modules/ROOT/pages/backup-restore/modes.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/backup-restore/modes.adoc b/modules/ROOT/pages/backup-restore/modes.adoc index 8b2b77b58..837399b6e 100644 --- a/modules/ROOT/pages/backup-restore/modes.adoc +++ b/modules/ROOT/pages/backup-restore/modes.adoc @@ -44,7 +44,7 @@ For more information about online backup options and how to control memory usage The `neo4j-admin database dump` command creates a single-file archive, that follows the format _.dump_, and stores it in the xref:configuration/file-locations.adoc#data[_/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. +Note that when using `neo4j-admin database dump`, only the database contents are backed up; the associated users and roles metadata are not included. For more information about performing a full backup against an *offline* database, see xref:backup-restore/offline-backup.adoc[Back up an offline database]. From 8cc2457d050145f2376353148152a612269b8757 Mon Sep 17 00:00:00 2001 From: Natalia Ivakina <82437520+NataliaIvakina@users.noreply.github.com> Date: Fri, 19 Dec 2025 10:54:15 +0100 Subject: [PATCH 6/6] Apply suggestion from @NataliaIvakina --- modules/ROOT/pages/backup-restore/offline-backup.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/backup-restore/offline-backup.adoc b/modules/ROOT/pages/backup-restore/offline-backup.adoc index 2081c0e13..915f40d51 100644 --- a/modules/ROOT/pages/backup-restore/offline-backup.adoc +++ b/modules/ROOT/pages/backup-restore/offline-backup.adoc @@ -13,7 +13,7 @@ Remember to xref:backup-restore/planning.adoc[plan your backup] carefully and ba The `neo4j-admin database dump` command can be used for performing a full backup of an **offline** database. It dumps only the database content into a single-file archive, called _.dump_, and stores it in the xref:configuration/file-locations.adoc#data[_/data_] directory. -Note that the `neo4j-admin database dump` command **does not** support backing up database metadata. +Note that the `neo4j-admin database dump` command **does not** support backing up users and roles metadata. Alternatively, `neo4j-admin database dump` can stream dump to standard output, enabling the output to be piped to another program, for example to `neo4j-admin database load`.