You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ROOT/pages/backup-restore/inspect.adoc
+59-44Lines changed: 59 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,39 +1,37 @@
1
1
[role=enterprise-edition]
2
2
[[inspect-backup]]
3
-
= Inspect the metadata of a database backup file.
3
+
= Inspect the metadata of a backup file
4
4
: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..
5
5
6
+
You can inspect the metadata of a database backup file using the `neo4j-admin backup inspect` command.
7
+
6
8
[[inspect-backup-command]]
7
9
== Command
8
10
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.
26
15
16
+
The metadata contains the following information:
27
17
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.
@@ -55,10 +53,9 @@ Command to read the backup metadata.
55
53
56
54
[NOTE]
57
55
====
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).
61
57
====
58
+
62
59
[[inspect-backup-command-options]]
63
60
=== Options
64
61
@@ -114,7 +111,7 @@ The `<backup-path>` parameter can also inspect backup from AWS S3 buckets (from
114
111
[[aggregate-backup-example]]
115
112
== Examples
116
113
117
-
Given a folder `/backups` containing a set of database backups:
114
+
Given the folder _/backups_ containing a set of database backups:
118
115
119
116
[source,shell]
120
117
----
@@ -131,14 +128,22 @@ Given a folder `/backups` containing a set of database backups:
131
128
└── neo4j-2024-10-07T16-05-37.backup
132
129
----
133
130
134
-
=== Listing the metadata of the backup files.
131
+
=== Listing the metadata of the backup files
135
132
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:
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
-
160
160
=== Listing the latest backups
161
161
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.
@@ -173,39 +177,50 @@ Using the `--latest-backup` option, only lists for each databse the last backups
173
177
174
178
=== Inspecting backup chains
175
179
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:
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:
188
197
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].
191
202
192
203
193
-
=== Inspecting a backup chain ending with a given backup
204
+
=== Inspecting a backup chain ending with a specific backup
194
205
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:
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_.
0 commit comments