Skip to main content

Backup & Restore

The MSSQL Provider backs up SQL Server natively through the mssql-native backup class. Backups run through SQL Server's BACKUP ... TO URL against S3-compatible object storage, driven by the operator's MSSQLBackup, MSSQLBackupSchedule, and MSSQLRestore resources — there is no side-car Job.

The mssql-native backup class​

PropertyValue
ExecutionProvider-managed (operator-native, no Job)
StorageS3-compatible object storage
Point-in-time recovery (PITR)Supported (standalone instances)
RequiresSQL Server 2022 or later (backups on a 2019 Instance are rejected)

Backup storage with a private CA​

SQL Server's BACKUP ... TO URL always connects over HTTPS and validates the server certificate. For S3-compatible storage signed by a private CA (since v0.1.13), add the CA certificate under the ca.crt key of the BackupStorage credentials Secret:

kubectl create secret generic my-s3-credentials \
--from-literal=AWS_ACCESS_KEY_ID=<access-key> \
--from-literal=AWS_SECRET_ACCESS_KEY=<secret-key> \
--from-file=ca.crt=./my-ca.crt

The provider copies the CA into a <instance>-backup-ca-<storage> Secret next to the Instance, and the operator adds it to SQL Server's trust store. A BackupStorage with an http:// endpoint is rejected with an InvalidEndpoint error.

Point-in-time recovery​

SQL Server supports PITR by replaying the transaction-log chain (full → differential → log) up to a target time. Enable it per storage with spec.backup.storages[].pitr.enabled=true; the provider then archives transaction-log backups on a schedule so a recovery chain always exists.

spec:
backup:
storages:
- name: s3-primary
pitr:
enabled: true
note

PITR restore into an Availability Group is not supported by the operator yet — only standalone instances.

How it maps to the operator​

The provider translates platform Backup / Restore resources into the operator's native backup CRDs. For the underlying mechanics — backup types, retention, S3 target configuration, and restore semantics — see the operator's Backups & Restores guide.

See also​