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/kubernetes/operations/backup-restore.adoc
+123-8Lines changed: 123 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,31 @@ For performing backups, Neo4j uses the _Admin Service_, which is only available
8
8
For more information, see xref:kubernetes/accessing-neo4j.adoc[Accessing Neo4j].
9
9
====
10
10
11
+
[[kubernetes-backup-storage-options]]
12
+
== Backup storage options
13
+
14
+
Neo4j's Helm chart supports both full and differential backups and can be configured to use cloud providers or local storage.
15
+
16
+
=== Cloud storage
17
+
18
+
Neo4j Helm chart uses Neo4j's native cloud storage integration with direct upload to create immutable backup objects.
19
+
This allows you to back up your Neo4j databases directly to cloud storage without the need for persistent volumes.
20
+
The chart can be configured to use cloud providers, such as AWS S3, Google Cloud Storage, and Azure Blob Storage, by setting the `cloudProvider` parameter to `aws`, `gcp`, or `azure` in the _backup-values.yaml_ file.
21
+
22
+
The following features are supported:
23
+
24
+
* *Direct cloud storage upload* - No intermediate local storage required.
25
+
* *Differential backup chains* with `preferDiffAsParent: true`.
26
+
* *Immutable backup objects* in cloud storage.
27
+
* *Support for S3-compatible endpoints*.
28
+
* *Enhanced S3 configuration* including custom CA certificates and endpoint settings.
29
+
30
+
=== Local storage
31
+
32
+
Local storage creates local backups in the `/backups` mount.
33
+
This mount must be configured to use a persistent storage for large databases using `tempVolume`.
34
+
The `cloudProvider` must be empty.
35
+
11
36
[[kubernetes-neo4j-backup-cloud]]
12
37
== Prepare to back up a database(s) to a cloud provider (AWS, GCP, and Azure) bucket
13
38
@@ -32,6 +57,12 @@ For more information, see link:https://min.io/docs/minio/linux/integrations/aws-
32
57
* The latest Neo4j Helm charts.
33
58
You can update the repository to get the latest charts using `helm repo update`.
34
59
60
+
[NOTE]
61
+
====
62
+
When using cloud providers, differential backups do not require persistent volumes with previous backups.
63
+
Instead, the chart will first create a full backup in the cloud storage, and then, the subsequent backups will be differential backups that reference this full backup.
64
+
====
65
+
35
66
=== Create a Kubernetes secret
36
67
37
68
You can create a Kubernetes secret with the credentials that can access the cloud provider bucket using one of the following options:
@@ -120,6 +151,10 @@ backup:
120
151
cloudProvider: "gcp"
121
152
secretName: "gcpcreds"
122
153
secretKeyName: "credentials"
154
+
# Enable cloud-native differential backups
155
+
preferDiffAsParent: true
156
+
type: "AUTO" # First backup will be FULL, subsequent ones DIFF
157
+
fallbackToFull: true
123
158
124
159
consistencyCheck:
125
160
enabled: true
@@ -145,6 +180,10 @@ backup:
145
180
cloudProvider: "aws"
146
181
secretName: "awscreds"
147
182
secretKeyName: "credentials"
183
+
# Enable cloud-native differential backups
184
+
preferDiffAsParent: true
185
+
type: "AUTO" # First backup will be FULL, subsequent ones DIFF
186
+
fallbackToFull: true
148
187
149
188
consistencyCheck:
150
189
enabled: true
@@ -170,6 +209,10 @@ backup:
170
209
cloudProvider: "azure"
171
210
secretName: "azurecreds"
172
211
secretKeyName: "credentials"
212
+
# Enable cloud-native differential backups
213
+
preferDiffAsParent: true
214
+
type: "AUTO" # First backup will be FULL, subsequent ones DIFF
215
+
fallbackToFull: true
173
216
174
217
consistencyCheck:
175
218
enabled: true
@@ -209,6 +252,10 @@ backup:
209
252
cloudProvider: "gcp"
210
253
secretName: ""
211
254
secretKeyName: ""
255
+
# Enable cloud-native differential backups
256
+
preferDiffAsParent: true
257
+
type: "AUTO" # First backup will be FULL, subsequent ones DIFF
258
+
fallbackToFull: true
212
259
213
260
consistencyCheck:
214
261
enabled: true
@@ -236,6 +283,10 @@ backup:
236
283
cloudProvider: "aws"
237
284
secretName: ""
238
285
secretKeyName: ""
286
+
# Enable cloud-native differential backups
287
+
preferDiffAsParent: true
288
+
type: "AUTO" # First backup will be FULL, subsequent ones DIFF
289
+
fallbackToFull: true
239
290
240
291
consistencyCheck:
241
292
enabled: true
@@ -262,6 +313,10 @@ backup:
262
313
database: "neo4j,system"
263
314
cloudProvider: "azure"
264
315
azureStorageAccountName: "storageAccountName"
316
+
# Enable cloud-native differential backups
317
+
preferDiffAsParent: true
318
+
type: "AUTO" # First backup will be FULL, subsequent ones DIFF
319
+
fallbackToFull: true
265
320
266
321
consistencyCheck:
267
322
enabled: true
@@ -283,7 +338,8 @@ tempVolume:
283
338
284
339
[NOTE]
285
340
====
286
-
You need to create the persistent volume and persistent volume claim before installing the _neo4j-admin_ Helm chart.
341
+
You need to create the persistent volume and persistent volume claim before installing the _neo4j-admin_ Helm chart only when using local storage.
342
+
When using cloud providers, persistent volumes are not required for differential backups.
287
343
For more information, see xref:kubernetes/persistent-volumes.adoc[Volume mounts and persistent volumes].
288
344
====
289
345
@@ -306,6 +362,16 @@ backup:
306
362
307
363
# Optional: Skip TLS verification (not recommended for production)
308
364
s3SkipVerify: false
365
+
366
+
# Optional: Force path-style addressing for S3 requests
367
+
s3ForcePathStyle: true
368
+
369
+
# Optional: Specify S3 region
370
+
s3Region: "us-east-1"
371
+
372
+
# Alternative: Use Kubernetes secret for CA certificate
373
+
s3CASecretName: "s3-ca-cert"
374
+
s3CASecretKey: "ca.crt"
309
375
----
310
376
311
377
The following are examples of how to configure the backup system for different S3-compatible storage providers:
@@ -381,6 +447,29 @@ backup:
381
447
* Legacy MinIO support through the `minioEndpoint` parameter is deprecated - use `s3Endpoint` instead.
382
448
====
383
449
450
+
=== S3 CA certificate setup
451
+
452
+
For S3 endpoints with custom CA certificates, use a Kubernetes secret to manage the CA certificate:
. Exit the Cypher Shell command-line console by typing `:exit;`.
899
996
900
997
=== Restore the database backup
901
998
@@ -949,3 +1046,21 @@ For more information, see xref:backup-restore/restore-backup.adoc#restore-backup
949
1046
====
950
1047
To restore the `system` database, follow the steps described in xref:kubernetes/operations/dump-load.adoc[Dump and load databases (offline)].
951
1048
====
1049
+
1050
+
[[kubernetes-backup-migration]]
1051
+
== Migrate from traditional to cloud-native backups
1052
+
1053
+
To migrate from persistent volume-based backups to cloud-native backups, you need to follow these steps:
1054
+
1055
+
. Perform a final traditional backup to ensure you have the latest data.
1056
+
For more information, see <<kubernetes-neo4j-backup-on-prem, Prepare to back up a database(s) to on-premises storage>> and <<kubernetes-neo4j-backup, Back up your databases>>.
1057
+
. Upload existing backups to the cloud storage bucket if needed.
1058
+
You can use cloud provider CLI tools to transfer your backup files:
1059
+
** For AWS S3: `aws s3 cp /path/to/backups s3://your-bucket/backups --recursive`
1060
+
** For Google Cloud Storage: `gsutil cp -r /path/to/backups gs://your-bucket/backups`
0 commit comments