-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbackup-incremental.yaml
More file actions
54 lines (53 loc) · 1.87 KB
/
backup-incremental.yaml
File metadata and controls
54 lines (53 loc) · 1.87 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
# ============================================================
# Incremental (AUTO) Backup of a specific database to S3
#
# When Kind=Database:
# - target.name = the Neo4j database name (e.g. "orders")
# - target.clusterRef = the Neo4jEnterpriseCluster name
#
# Create the AWS credentials secret first:
# kubectl create secret generic aws-backup-credentials \
# --from-literal=AWS_ACCESS_KEY_ID=<your-access-key-id> \
# --from-literal=AWS_SECRET_ACCESS_KEY=<your-secret-access-key>
# ============================================================
apiVersion: neo4j.neo4j.com/v1alpha1
kind: Neo4jBackup
metadata:
name: incremental-backup
namespace: default
spec:
target:
kind: Database
name: orders # The Neo4j database to back up
clusterRef: my-neo4j-cluster # The Neo4jEnterpriseCluster that hosts this database
# schedule is a flat cron string — not spec.schedule.cron
schedule: "0 */6 * * *" # Every 6 hours
options:
# AUTO: creates a FULL backup if none exists, otherwise creates DIFF (incremental)
backupType: AUTO
compress: true
pageCache: "2G"
# tempPath recommended for cloud uploads to avoid partial writes
tempPath: /tmp/neo4j-backup-temp
# preferDiffAsParent: true # CalVer 2025.04+ only — use latest DIFF as parent for chained diffs
storage:
type: s3
bucket: my-neo4j-backups
path: incremental/orders # Path/prefix within the bucket
cloud:
provider: aws
credentialsSecretRef: aws-backup-credentials # Secret with AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY
retention:
maxAge: "3d"
maxCount: 12 # Keep last 12 incremental backups
---
# AWS credentials secret
apiVersion: v1
kind: Secret
metadata:
name: aws-backup-credentials
namespace: default
type: Opaque
stringData:
AWS_ACCESS_KEY_ID: <your-access-key-id>
AWS_SECRET_ACCESS_KEY: <your-secret-access-key>