Securing MariaDB: Data-at-Rest Encryption and Reliable Backups
Databases

Securing MariaDB: Data-at-Rest Encryption and Reliable Backups

  • AuthorKacey H.
  • Date
  • Time13 minutes

Goals

Encrypt data-at-rest to protect against stolen disks and ensure backups are encrypted and restorable.

TDE via Filesystem

If MariaDB doesn't support native TDE in your build, prefer encrypting the filesystem (LUKS) for the data directory and secure key management.

Encrypted Offsite Backups

Use restic or duplicity to create encrypted backups and push to S3-compatible storage:

bash
# initialize restic repository
restic init -r s3:s3.amazonaws.com/mybucket
# backup mysql dump
mysqldump -u root -p mydb > /tmp/mydb.sql
restic -r s3:s3.amazonaws.com/mybucket backup /tmp/mydb.sql

Technical Author

Kacey H.

Kacey H.

Support and guides. Turns the questions that show up in tickets into steps you can follow.