ACC ConfigServer DB Backup
search cancel

ACC ConfigServer DB Backup

book

Article ID: 445752

calendar_today

Updated On:

Products

DX Operational Intelligence DX Operational Observability

Issue/Introduction

Is there any way to create a backup procedure for the ACC database? pod name ng-acc-configserver-db

Before deploying the ACC ConfigServer DB daily backup CronJob, the capacity of the existing `dxi-backup` PVC must be validated. The PVC is currently **10Gi**, and depending on the database size and compression ratio, this may not be sufficient to retain 7 days of backups without running out of space.

Running out of backup storage will cause backup jobs to fail silently and leave the environment without a valid recovery point.

Environment

DX O2 On-Premises 26.1
ACC (Application Command Center) | `ng-acc-configserver-db`

Resolution

Step 1: Check current database data directory size

```bash
kubectl -n dxi exec -it \
  $(kubectl -n dxi get pod -l app=ng-acc-configserver-db -o jsonpath='{.items[*].metadata.name}') \
  -- du -sh /var/lib/postgresql/data/
```

Step 2: Estimate compressed backup size

`pg_dump` with custom format (`-F c`) typically compresses to **20–40% of the raw data directory size**. Use the value from Step 1 to estimate:

| Raw data size | Estimated backup size (per day) | 7-day total |
|---|---|---|
| 500 MB | ~150 MB | ~1 GB |
| 2 GB | ~600 MB | ~4.2 GB |
| 5 GB | ~1.5 GB | ~10.5 GB ⚠️ |
| 10 GB | ~3 GB | ~21 GB ❌ |

Step 3: Check available space on the backup PVC

Run a temporary pod to inspect current usage:

```bash
kubectl run -it --rm backup-size-check \
  --image=SERVER/dxi/acc-postgresql:26.1.0.19 \
  --restart=Never \
  --overrides='{
    "spec": {
      "securityContext": {"runAsUser": 1010, "runAsGroup": 1010, "fsGroup": 1010},
      "imagePullSecrets": [{"name": "image-pull-secret"}],
      "volumes": [{"name": "bvol", "persistentVolumeClaim": {"claimName": "dxi-backup"}}],
      "containers": [{
        "name": "c",
        "image": "SERVER/dxi/acc-postgresql:26.1.0.19",
        "command": ["df", "-h", "/backup"],
        "volumeMounts": [{"name": "bvol", "mountPath": "/backup"}]
      }]
    }
  }' \
  -n dxi
```

Step 4: Decision

| Result | Action |
|---|---|
| 7-day total estimate fits within 10Gi | Proceed with backup CronJob as-is |
| 7-day total exceeds 10Gi | Expand the PVC **or** reduce `RETENTION_DAYS` in the CronJob |

**To expand the PVC** (if the StorageClass supports dynamic resizing):

```bash
kubectl patch pvc dxi-backup -n dxi \
  -p '{"spec": {"resources": {"requests": {"storage": "50Gi"}}}}'
```

Confirm with the storage/infrastructure team that `apmservices-backup` StorageClass supports volume expansion before applying.

 

Additional Information

- The `dxi-backup` PVC is currently dedicated to ACC backup use. Verify with the infrastructure team whether other components also write to it before expanding or modifying.
- If PVC expansion is not possible, an alternative is to reduce retention to 3 days initially and revisit capacity planning after the first week of backups.
- Add a backup size monitoring alert if the platform supports it, trigger when `dxi-backup` usage exceeds 80%.