Skip to content

Commit 3fdf609

Browse files
Document how to recover unrecovered full backup (#2601) (#2606)
Co-authored-by: Nick Giles <[email protected]>
1 parent b4d5651 commit 3fdf609

File tree

2 files changed

+45
-4
lines changed

2 files changed

+45
-4
lines changed

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

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[role=enterprise-edition]
22
[[aggregate-backup]]
33
= Aggregate a database backup chain
4-
:description: This section describes how to aggregate a backup chain into a single backup.
4+
:description: This section describes how to aggregate a backup chain into a single backup and recover a full backup.
55

66
[[aggregate-backup-command]]
77
== Command
@@ -17,6 +17,8 @@ The benefits of aggregating a backup chain are notably:
1717
As part of the aggregation, transactions contained in the differential backups are applied to the store contained in the full backup artifact.
1818
This operation is called _recovery_ and can be costly.
1919
* Reduces the risk of losing chain’s links.
20+
* Some commands, like consistency check, cannot run against a backup chain or a full backup that is not recovered.
21+
Aggregating produces an artifact they can work against.
2022

2123

2224
[role=label--changed-2025.01]
@@ -205,3 +207,40 @@ bin/neo4j-admin backup aggregate --from-path=azb://myStorageAccount/myContainer/
205207
----
206208
======
207209
=====
210+
211+
212+
[[aggregate-unrecovered-full-backup]]
213+
=== Aggregating an unrecovered full backup
214+
215+
To check if a full backup is in a recovered state, run the `neo4j-admin backup inspect` command:
216+
217+
[source,shell]
218+
----
219+
bin/neo4j-admin backup inspect /mnt/backups/neo4j-2025-09-10T08-14-56.backup
220+
----
221+
222+
The output will include the `RECOVERED` column.
223+
If it shows `false`, the backup is not yet recovered:
224+
225+
[output]
226+
----
227+
| FILE | DATABASE | DATABASE ID | TIME (UTC) | FULL | COMPRESSED | LOWEST TX | HIGHEST TX | STORE ID HASH | RECOVERED |
228+
| file:///mnt/backups/neo4j-2025-09-10T08-14-56.backup | neo4j | 4e98fab8-6ae6-46cc-84c0-61ee8a8db60a | 2025-09-10T08:14:56 | true | true | 1 | 3 | -116350002 | false |
229+
----
230+
231+
If your full backup is not recovered, aggregating it will perform recovery.
232+
Run the following command:
233+
234+
[source,shell]
235+
----
236+
bin/neo4j-admin backup aggregate --from-path=/mnt/backups/neo4j-2025-09-10T08-14-56.backup --keep-old-backup=true
237+
----
238+
239+
This command will:
240+
241+
* Generate a new, recovered backup alongside the existing one.
242+
* Preserve the original backup file (due to `--keep-old-backup=true`).
243+
244+
After aggregation, you can run consistency checker against the recovered backup and/or restore it.
245+
246+

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[[consistency-checker]]
44
= Check database consistency
55

6-
You can use the `neo4j-admin database check` command to check the consistency of a database, a dump, or a full backup.
6+
You can use the `neo4j-admin database check` command to check the consistency of a database, a dump, or a full recovered backup.
77
The `neo4j-admin` tool is located in the _/bin_ directory.
88

99
== Syntax
@@ -202,8 +202,10 @@ Consistency check
202202

203203
[NOTE]
204204
====
205-
Note that consistency check is not supported for differential backups.
206-
The backup chain must be aggregated into a full backup artifact before running consistency check.
205+
Note that consistency check is not supported for differential backups or unrecovered full backups.
206+
The backup chain must be aggregated into a full recovered backup artifact before running consistency check.
207+
208+
See xref:backup-restore/aggregate.adoc[] for more details.
207209
====
208210

209211
Run with the `--from-path` option to check the consistency of a backup or a dump:

0 commit comments

Comments
 (0)