Automatic backups
DX Cloud provides automatic backups as defined in the values.yml file in your project. The backup sidecar is a container defined in the Magnolia Database (DB) pod of both the author and public workloads. The sidecar provides endpoints to list and create backups. In order to execute the endpoint, a port forward to the corresponding pod/container is required. The backup server is running on port 9999.
| Write ahead logging (WAL) must be enabled for the backup to work properly. It stores a base backup as well as the transaction logs. | 
 
values.yml file
The values.yml file is found in the root of your DX Cloud project folder.
| The example below shows the dbsection of the file. For a full look at the file, see here. | 
...
db:
  backup:
    enabled: true
    env:
      - name: MGNLBACKUP_PG_DATA
        value: "/db/data"
      - name: MGNLBACKUP_USE_PG_WAL (1)
        value: "true"
      - name: MGNLBACKUP_SYNC_DIR
        value: "/archive"
      - name: MGNLBACKUP_NO_STDOUT
        value: "true"
      - name: MGNLBACKUP_LOGLEVEL
        value: "debug"
      - name: MGNLBACKUP_BUCKET (2)
        value: "[subscription-name]-backup-bucket"
      - name: MGNLBACKUP_PREFIX
        value: {{ .Env.DEPLOYMENT }}/author
      - name: MGNLBACKUP_HERITAGE
        value: "magnolia-backup"
      - name: MGNLBACKUP_CRON (3)
        value: "0 3 * * *"
      - name: MGNLBACKUP_KEEPDAYS (4)
        value: "30"
      - name: MGNLBACKUP_S3_ENDPOINT (5)
        value: "s3.eu-central-1.amazonaws.com"
      - name: MGNLBACKUP_S3_REGION (6)
        value: "eu-central-1"
      - name: MGNLBACKUP_S3_ACCESSKEY (7)
        valueFrom:
          secretKeyRef:
            name: s3-backup-key
            key: accesskey
      - name: MGNLBACKUP_S3_SECRETKEY (7)
        valueFrom:
          secretKeyRef:
            name: s3-backup-key
            key: secretkey
      - name: MGNLBACKUP_TAGS_NODE_NAME
        valueFrom:
          fieldRef:
            fieldPath: spec.nodeName
      - name: MGNLBACKUP_TAGS_NAMESPACE
        valueFrom:
          fieldRef:
            fieldPath: metadata.namespace
      - name: MGNLBACKUP_TAGS_POD_NAME
        valueFrom:
          fieldRef:
            fieldPath: metadata.name
      - name: MGNLBACKUP_TAGS_RELEASE
        value: {{ .Env.DEPLOYMENT }}
...| 1 | MGNLBACKUP_USE_PG_WAL(write-ahead-logging) has to be enabled in order to use Postgres WAL for Point-in-Time Recovery. | ||||
| 2 | MGNLBACKUP_BUCKETname of the bucket containing the subscription name. | ||||
| 3 | MGNLBACKUP_CRONcron expression for how often a full base backup is created.
 
 | ||||
| 4 | MGNLBACKUP_KEEPDAYSnumber of days backups are stored in S3 (or similar S3-compatible storage) for the specified number of days. | ||||
| 5 | MGNLBACKUP_S3_ENDPOINTendpoint for S3 server storing the backups. | ||||
| 6 | MGNLBACKUP_S3_REGIONAWS region for the S3. | ||||
| 7 | MGNLBACKUP_S3_ACCESSKEY&MGNLBACKUP_S3_SECRETKEYAPI token credentials for connecting to S3.
 |