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/index.adoc
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@ This chapter describes the following:
9
9
* xref:backup-restore/online-backup.adoc[Back up an online database] -- How to back up an online database.
10
10
* xref:backup-restore/aggregate.adoc[Aggregate a database backup chain] - How to aggregate a backup chain into a single backup.
11
11
* xref:backup-restore/inspect.adoc[Inspect the metadata of a database backup file] -- How to inspect the metadata of a database backup file.
12
+
* xref:backup-restore/validate.adoc[Validate a sharded property database backup] -- How to validate a sharded property database backup using the `neo4j-admin backup validate` command.
12
13
* xref:backup-restore/consistency-checker.adoc[Check database consistency] -- How to check the consistency of a database, backup, or a dump.
13
14
* xref:backup-restore/restore-backup.adoc[Restore a database backup] -- How to restore a database backup in a live Neo4j deployment.
14
15
* xref:backup-restore/offline-backup.adoc[Back up an offline database] -- How to back up an offline database.
When you back up a sharded property database, you create multiple backup chains—one for each shard.
8
+
The backup chains of the graph shard will have 1 full backup and 0 or more differential backups.
9
+
Whereas the property shard backup chains will have only 1 full backup, differential backups of property shards are not supported.
10
+
See xref:scalability/sharded-property-databases/admin-operations.adoc#backup-and-restore[Backup and restore] for more information on backing up sharded property databases.
11
+
12
+
To ensure that the backup chains are valid and can be used for restoration, you can use the `neo4j-admin backup validate` command.
13
+
14
+
[[validate-backup-command]]
15
+
== Command
16
+
17
+
The `neo4j-admin backup validate` command checks the integrity and consistency of the backup artifacts for a specified sharded property database.
The output will indicate whether the backups are valid.
85
+
For example:
86
+
87
+
[result]
88
+
----
89
+
| DATABASE | PATH | STATUS |
90
+
| foo-g000 | /bucket/backups/foo-g000-2025-06-11T21-04-42.backup | OK |
91
+
| foo-p000 | /bucket/backups/foo-p000-2025-06-11T21-04-37.backup | OK |
92
+
| foo-p001 | /bucket/backups/foo-p001-2025-06-11T21-04-40.backup | OK |
93
+
----
94
+
95
+
If valid, the backups can be used to xref:scalability/sharded-property-databases/data-ingestion.adoc#creating-sharded-db-from-uri[seed a sharded property database].
96
+
97
+
For more examples and details, see xref:scalability/sharded-property-databases/admin-operations.adoc#backup-and-restore[Backup and restore].
Copy file name to clipboardExpand all lines: modules/ROOT/pages/scalability/sharded-property-databases/admin-operations.adoc
+19-14Lines changed: 19 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,32 +48,34 @@ See xref:scalability/sharded-property-databases/data-ingestion.adoc#splitting-ex
48
48
A sharded property database is a database made up of multiple databases.
49
49
This means that when you want to back up a database, you must back up all the shards individually, resulting in a sharded property database backup that is composed of multiple smaller backup chains.
50
50
51
-
Backup chains for each shard are produced using the neo4j-admin database backup.
51
+
Backup chains for each shard are produced using the `neo4j-admin database backup` command.
52
52
For the graph shard, its backup chain must contain one full artefact and 0+ differential artefacts.
53
53
Each property shard’s backup chain must contain only one full backup and no differential backups.
54
54
In practical terms, this means that to back up a sharded property database, you start with a full backup of the graph shard and then all of the property shards; any subsequent differential backups would only need to be of the graph shard.
55
55
This is because the transaction log of the property shards is the same as the graph shard log and is simply filtered when applied, so only the graph shard log is required for a restore.
56
56
57
+
=== Validating sharded property database backups
58
+
57
59
For example, assume there is a sharded property database called `foo` with a graph shard and 2 property shards.
58
-
A backup must be taken of each shard, for example:
The `--remote-address-resolution` option requires `internal.dbms.cluster.experimental_protocol_version.dbms_enabled=true` to be set in both the _neo4j.conf_ and _neo4j-admin.conf_ files.
66
-
67
-
You can then check the validity of the resulting backups using:
68
-
68
+
. Check the validity of the resulting backups.
69
+
For details on command syntax and options, see xref:backup-restore/validate.adoc[Validate a database backup].
SET PROPERTY SHARDS { COUNT 2 TOPOLOGY 1 REPLICA }
91
93
OPTIONS {seedUri:"s3://bucket/backups/"};
92
94
----
93
95
96
+
=== Understanding backup validation
97
+
94
98
Due to potential synchronization issues that might occur when shard backups are not on the exact same transaction IDs (since backups can be taken in parallel or sequentially), the restore process is designed to be very lenient to different shards at different transaction IDs.
95
99
As a result, a sharded property database backup is considered valid if the store files of each property shard are within the range of transactions recorded in the graph shard’s transaction log.
96
100
97
101
For example, assume the graph shard’s store files are at tx 10 and it has transaction logs from tx 11-36, and property shard 1’s store files are at 13 and property shard 2’s store files are at 30, then at restore time, all databases can be recovered and made consistent up to transaction 36.
98
102
99
103
You can use the command `neo4j-admin backup validate` to check whether a collection of backup chains for a database is valid.
104
+
For details on command syntax and options, see xref:backup-restore/validate.adoc[Validate a database backup].
100
105
101
106
Additional actions may be required to create a validated backup if a property shard is ahead or behind the range of transactions in the graph shard backup chain.
102
107
@@ -113,8 +118,8 @@ To form a validated backup, you must ensure that each property shard’s store f
113
118
In the example above, property shard `foo-p000` is behind the graph shard backup chain, and property shard `foo-p001` is ahead of the graph shard backup chain.
114
119
To form a valid sharded property database backup, you need to:
115
120
116
-
* Take a full backup of the property shard `foo-p000` so that its store at least includes transaction 5.
117
-
* Take a differential backup of the graph shard so that at least transaction 12 is included in its transaction log, so `foo-p001` is included in its range.
121
+
. Take a full backup of the property shard `foo-p000` so that its store at least includes transaction 5.
122
+
. Take a differential backup of the graph shard, so that at least transaction 12 is included in its transaction log, so `foo-p001` is included in its range.
118
123
119
124
Once a valid sharded properties database backup is created, differential backups can be performed by taking differential backups of the graph shard, extending the range of the graph shard chain.
120
125
Continuing with the example, the graph chain contains transactions from 11 to 36, property shard 1’s store files are at 13, and property shard 2’s store files are at 30.
0 commit comments