-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathproperty-sharding-with-backup.yaml
More file actions
135 lines (115 loc) · 3.15 KB
/
property-sharding-with-backup.yaml
File metadata and controls
135 lines (115 loc) · 3.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# Property Sharding with Coordinated Backup Example
# This example shows how to configure backups for sharded databases.
# Note: backupConfig is not orchestrated for Neo4jShardedDatabase; use Neo4jBackup resources.
# Property sharding cluster
apiVersion: neo4j.com/v1alpha1
kind: Neo4jEnterpriseCluster
metadata:
name: backup-sharding-cluster
namespace: default
spec:
image:
repo: neo4j
tag: 2025.12-enterprise
# Authentication required for property sharding
auth:
adminSecret: neo4j-admin-secret
topology:
servers: 5
storage:
size: 20Gi
className: standard # Storage class must be specified
resources:
requests:
memory: 8Gi # Production memory for property sharding
cpu: 2000m # 2+ cores required for cross-shard queries
limits:
memory: 8Gi # Stable production allocation
cpu: 2000m # Consistent performance
propertySharding:
enabled: true
config:
# Extended retention for backup coordination
db.tx_log.rotation.retention_policy: "10 days"
# Backup-friendly settings
server.backup.enabled: "true"
server.backup.listen_address: "0.0.0.0:6362"
---
# Sharded database with backup configuration
apiVersion: neo4j.com/v1alpha1
kind: Neo4jShardedDatabase
metadata:
name: backed-up-sharded-db
namespace: default
spec:
clusterRef: backup-sharding-cluster
name: userdata
defaultCypherLanguage: "25"
propertySharding:
propertyShards: 4
graphShard:
primaries: 3
secondaries: 1
propertyShardTopology:
replicas: 2
---
# Manual backup job for immediate backup
apiVersion: neo4j.com/v1alpha1
kind: Neo4jBackup
metadata:
name: manual-sharded-backup
namespace: default
spec:
clusterRef: backup-sharding-cluster
# Multi-database backup for all shards
databases:
- name: "userdata-g000" # Graph shard
type: "full+differential"
schedule: "0 3 * * *"
- name: "userdata-p000" # Property shards (full backups only)
type: "full"
schedule: "0 3 * * *"
- name: "userdata-p001"
type: "full"
schedule: "0 3 * * *"
- name: "userdata-p002"
type: "full"
schedule: "0 3 * * *"
- name: "userdata-p003"
type: "full"
schedule: "0 3 * * *"
# Coordinated backup settings
consistency: "cross-database" # Ensure consistent point across all shards
parallelism: 2 # Backup shards in parallel for speed
storage:
type: "s3"
location: "s3://neo4j-backups/manual-sharded/"
credentials:
secretRef: "backup-credentials"
retention:
daily: 7 # Keep daily backups for 7 days
weekly: 4 # Keep weekly backups for 4 weeks
monthly: 6 # Keep monthly backups for 6 months
---
# Backup credentials
apiVersion: v1
kind: Secret
metadata:
name: backup-credentials
namespace: default
type: Opaque
data:
# Replace with actual base64-encoded credentials
access-key-id: QUNFRVNTX0tFWV9JRA==
secret-access-key: U0VDUkVUX0FDQ0VTU19LRVk=
---
# Neo4j admin credentials
apiVersion: v1
kind: Secret
metadata:
name: neo4j-admin-secret
namespace: default
type: Opaque
stringData:
username: "neo4j"
password: "backup-cluster-123"