Skip to content

Commit e48f153

Browse files
committed
editorial review
1 parent cacf89c commit e48f153

File tree

3 files changed

+61
-44
lines changed

3 files changed

+61
-44
lines changed

modules/ROOT/content-nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@
164164
** xref:backup-restore/modes.adoc[]
165165
** xref:backup-restore/online-backup.adoc[]
166166
** xref:backup-restore/aggregate.adoc[]
167+
** xref:backup-restore/inspect.adoc[]
167168
** xref:backup-restore/restore-backup.adoc[]
168169
** xref:backup-restore/offline-backup.adoc[]
169170
** xref:backup-restore/restore-dump.adoc[]

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ This chapter describes the following:
88
* xref:backup-restore/modes.adoc[Backup modes] -- The supported backup modes.
99
* xref:backup-restore/online-backup.adoc[Back up an online database] -- How to back up an online database.
1010
* xref:backup-restore/aggregate.adoc[Aggregate a database backup chain] - How to aggregate a backup chain into a single backup.
11+
* xref:backup-restore/inspect.adoc[Inspect the metadata of a database backup file] -- How to inspect the metadata of a database backup file.
1112
* xref:backup-restore/restore-backup.adoc[Restore a database backup] -- How to restore a database backup in a live Neo4j deployment.
1213
* xref:backup-restore/offline-backup.adoc[Back up an offline database] -- How to back up an offline database.
1314
* xref:backup-restore/restore-dump.adoc[Restore a database dump] -- How to restore a database dump in a live Neo4j deployment.

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

Lines changed: 59 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,37 @@
11
[role=enterprise-edition]
22
[[inspect-backup]]
3-
= Inspect the metadata of a database backup file.
3+
= Inspect the metadata of a backup file
44
:description: This section describes how to inspect the metadata of backup files. Metadata are information like the database name, the backup compression, the transaction range that the backup contains etc..
55

6+
You can inspect the metadata of a database backup file using the `neo4j-admin backup inspect` command.
7+
68
[[inspect-backup-command]]
79
== Command
810

9-
The inspect command lists the metadata stored in the header of backup files. Those metadata are notably used to define how backups are connected to constitute xref:backup-restore/online-backup.adoc#backup-chain[backup chains]. A backup chain is a sequence of one or more backup(s) logically connected. The order of the sequence guarantees that when replayed (see xref:backup-restore/restore-backup.adoc[restore] or xref:backup-restore/aggregate.adoc[aggregate]), the store and the transaction data are consumed in a consistent fashion.
10-
11-
12-
The metadata are
13-
14-
* *Database*: database name of the database fragment that the backup contains.
15-
* *Database id*: a unique identifier used to distinguish databases (even with same name)
16-
* *Time*: time the backup was taken
17-
* *Full*: indicates whether the backup is a full backup (i.e. initial backup containing the store files) or a differential backup (i.e. subsequent backup containing only transactions to be applied to the store files)
18-
* *Compressed*: indicates whether the backup data inside the backup file are compressed or not
19-
* *Lowest transaction id*: when the backup is full, this value is always 1 and when it is a differential backup the value corresponds to the first transaction id the backup starts with
20-
* *Highest transaction id*: similarly, this value indicates the last transaction id stored in the backup file.
21-
22-
23-
24-
25-
11+
The inspect command lists the metadata stored in the header of backup files.
12+
This metadata primarily defines how backups are connected to form xref:backup-restore/online-backup.adoc#backup-chain[backup chains].
13+
A backup chain is a sequence of one or more backup(s) logically connected.
14+
The order of the sequence guarantees that when replayed (see xref:backup-restore/restore-backup.adoc[restore] or xref:backup-restore/aggregate.adoc[aggregate]), the store and the transaction data are consumed in a consistent manner.
2615

16+
The metadata contains the following information:
2717

18+
* *Database*: database name of the database fragment that the backup includes.
19+
* *Database ID*: a unique identifier that distinguishes databases (even with the same name).
20+
* *Time*: time the backup was taken.
21+
* *Full*: indicates whether it is a full backup (i.e. initial backup containing the store files) or a differential backup (i.e. subsequent backup containing only the transactions to be applied to the store files).
22+
* *Compressed*: indicates whether the backup data inside the backup file is compressed.
23+
* *Lowest transaction ID*: when the backup is full, this value is always 1, and when it is a differential backup, the value corresponds to the first transaction ID the backup starts with.
24+
* *Highest transaction ID*: similarly, this value indicates the last transaction ID stored in the backup file.
2825

2926
[[inspect-backup-syntax]]
3027
=== Syntax
3128

3229
[source,role=noheader]
3330
----
34-
neo4j-admin backup inspect [-h] [--empty] [--expand-commands] [--latest-backup] [--latest-chain] [--show-metadata]
35-
[--verbose] [--additional-config=<file>] [--database=<database>] [--format=<value>]
36-
<backup-path>
31+
neo4j-admin backup inspect [-h] [--empty] [--expand-commands] [--latest-backup]
32+
[--latest-chain] [--show-metadata] [--verbose]
33+
[--additional-config=<file>] [--database=<database>]
34+
[--format=<value>] <backup-path>
3735
----
3836

3937
=== Description
@@ -55,10 +53,9 @@ Command to read the backup metadata.
5553

5654
[NOTE]
5755
====
58-
The `<backup-path>` parameter can also inspect backup from AWS S3 buckets (from Neo4j 5.19), Google Cloud storage buckets (from Neo4j 5.21), and Azure buckets (from Neo4j 5.24).
59-
60-
56+
The `<backup-path>` parameter can also inspect backups stored in AWS S3 buckets (from Neo4j 5.19), Google Cloud storage buckets (from Neo4j 5.21), and Azure buckets (from Neo4j 5.24).
6157
====
58+
6259
[[inspect-backup-command-options]]
6360
=== Options
6461

@@ -114,7 +111,7 @@ The `<backup-path>` parameter can also inspect backup from AWS S3 buckets (from
114111
[[aggregate-backup-example]]
115112
== Examples
116113

117-
Given a folder `/backups` containing a set of database backups:
114+
Given the folder _/backups_ containing a set of database backups:
118115

119116
[source,shell]
120117
----
@@ -131,14 +128,22 @@ Given a folder `/backups` containing a set of database backups:
131128
└── neo4j-2024-10-07T16-05-37.backup
132129
----
133130

134-
=== Listing the metadata of the backup files.
131+
=== Listing the metadata of the backup files
135132

136-
The following command list the backup files name along with their respective metadata.
133+
The following command lists the backup files' names along with their respective metadata:
137134

138135
[source,shell]
139136
----
140-
./bin/neo4j-admin backup inspect /backups --show-metadata --empty
137+
bin/neo4j-admin backup inspect /backups --show-metadata --empty
138+
----
141139

140+
The `--empty` option is used to include the empty backups.
141+
An empty backup is created when a database is backed up but no new data exists.
142+
Empty backups are used to record the backup history.
143+
144+
.Example output
145+
[result]
146+
----
142147
| FILE | DATABASE | DATABASE ID | TIME (UTC) | FULL | COMPRESSED | LOWEST TX | HIGHEST TX |
143148
| file:///backups/neo4j-2024-10-07T16-05-37.backup | neo4j | 7dcb1d0c-4374-4476-b8ae-d3c3f124683f | 2024-10-07T16:05:37 | true | true | 1 | 3 |
144149
| file:///backups/malmo-2024-10-07T16-01-24.backup | malmo | 62d1820c-3ac6-4b15-a0b3-bf7e7becc8d0 | 2024-10-07T16:01:24 | true | true | 1 | 8 |
@@ -152,19 +157,18 @@ The following command list the backup files name along with their respective met
152157
| file:///backups/london-2024-10-07T16-03-51.backup | london | d4dae73c-dfef-4d28-88cd-fe6cc88ddca1 | 2024-10-07T16:03:51 | true | true | 1 | 5 |
153158
----
154159

155-
[NOTE]
156-
====
157-
In the example above the `--empty` option is used to include the empty backups. An empty backup is created when a database is backed up but there is no new data. Empty backups are simply used to record the backup history.
158-
====
159-
160160
=== Listing the latest backups
161161

162-
Using the `--latest-backup` option, only lists for each databse the last backups that have been performed.
162+
To list only the most recent backups performed for each database, use the `--latest-backup` option.
163163

164164
[source,shell]
165165
----
166-
./bin/neo4j-admin backup inspect /backups --show-metadata --latest-backup
166+
bin/neo4j-admin backup inspect /backups --show-metadata --latest-backup
167+
----
167168

169+
.Example output
170+
[result]
171+
----
168172
| FILE | DATABASE | DATABASE ID | TIME (UTC) | FULL | COMPRESSED | LOWEST TX | HIGHEST TX |
169173
| file:///backups/neo4j-2024-10-07T16-05-37.backup | neo4j | 7dcb1d0c-4374-4476-b8ae-d3c3f124683f | 2024-10-07T16:05:37 | true | true | 1 | 3 |
170174
| file:///backups/malmo-2024-10-07T16-01-24.backup | malmo | 62d1820c-3ac6-4b15-a0b3-bf7e7becc8d0 | 2024-10-07T16:01:24 | true | true | 1 | 8 |
@@ -173,39 +177,50 @@ Using the `--latest-backup` option, only lists for each databse the last backups
173177

174178
=== Inspecting backup chains
175179

176-
As described before, a backup chain corresponds to a sequence of one or more backup(s) logically connected by their transaction ids. The option `--latest-chain` can be used to inspect the chains of a given database.
180+
A backup chain corresponds to a sequence of one or more backup(s) logically connected by their transaction IDs.
181+
To inspect the backup chains of a given database, use the `--latest-chain` option and the `--database` option with the database whose backup chain you want to inspect:
177182

178183
[source,shell]
179184
----
180-
./bin/neo4j-admin backup inspect /backups --show-metadata --latest-chain --database=london
185+
bin/neo4j-admin backup inspect /backups --show-metadata --latest-chain --database=london
186+
----
181187

188+
.Example output
189+
[result]
190+
----
182191
| FILE | DATABASE | DATABASE ID | TIME (UTC) | FULL | COMPRESSED | LOWEST TX | HIGHEST TX |
183192
| file:///backups/london-2024-10-07T16-04-05.backup | london | d4dae73c-dfef-4d28-88cd-fe6cc88ddca1 | 2024-10-07T16:04:05 | false | true | 6 | 6 |
184193
| file:///backups/london-2024-10-07T16-03-51.backup | london | d4dae73c-dfef-4d28-88cd-fe6cc88ddca1 | 2024-10-07T16:03:51 | true | true | 1 | 5 |
185194
----
186195

187-
In the example above, the option `--database` is required because the command needs to know for which database it should find the backup chain. The result returned is a chain of size two where,
196+
The result returns a chain of size two:
188197

189-
* the first backup is a full backup containing the store files within the transaction range [1,5] and,
190-
* the second backup is a differential backup containing only the subsequent modifications to the store files. Those modifications are materialised by a sequence of transactions to apply. Its range is [6,6].
198+
* The first backup is a full backup containing the store files within the transaction range [1,5].
199+
* The second backup is a differential backup containing only the subsequent modifications to the store files.
200+
Those modifications are materialised by a sequence of transactions to apply.
201+
Its range is [6,6].
191202

192203

193-
=== Inspecting a backup chain ending with a given backup
204+
=== Inspecting a backup chain ending with a specific backup
194205

195-
Sometimes a user might be interested in a backup chain ending with a specific backup. This can be find as follow:
206+
To inspect a backup chain ending with a specific backup, use the `--latest-chain` option as follows:
196207

197208
[source,shell]
198209
----
199-
./bin/neo4j-admin backup inspect /backups/london-2024-10-07T16-04-05.backup --show-metadata --latest-chain
210+
bin/neo4j-admin backup inspect /backups/london-2024-10-07T16-04-05.backup --show-metadata --latest-chain
211+
----
200212

213+
.Example output
214+
[result]
215+
----
201216
| FILE | DATABASE | DATABASE ID | TIME (UTC) | FULL | COMPRESSED | LOWEST TX | HIGHEST TX |
202217
| file:///backups/london-2024-10-07T16-04-05.backup | london | d4dae73c-dfef-4d28-88cd-fe6cc88ddca1 | 2024-10-07T16:04:05 | false | true | 6 | 6 |
203218
| file:///backups/london-2024-10-07T16-03-51.backup | london | d4dae73c-dfef-4d28-88cd-fe6cc88ddca1 | 2024-10-07T16:03:51 | true | true | 1 | 5 |
204219
----
205220

206221
[NOTE]
207222
====
208-
In this specific case, the `--database` option is not needed because the database identifier is part of the metadata stored in the header of the backup file `london-2024-10-07T16-04-05.backup`.
223+
In this case, the `--database` option is unnecessary because the database identifier is part of the metadata stored in the header of the backup file _london-2024-10-07T16-04-05.backup_.
209224
====
210225

211226

0 commit comments

Comments
 (0)