Docs / Surfaces / Databases / MySQL and MariaDB

MySQL and MariaDB

SafeGrd backs up MySQL 8.0 and 8.4 and MariaDB 10.6 and 11.4 with mysqldump. This page covers the grants the backup account needs, TLS options, restoring, and Amazon RDS and Aurora.

# MySQL 8.0 and 8.4, MariaDB 10.6 and 11.4 (each run by the test suite)
safegrd backup --database-url "mysql://backup:$DB_PASSWORD@db.internal:3306/shop" --retention-days 14

MySQL surfaces run mysqldump (or mariadb-dump) with --single-transaction, which reads InnoDB tables from one consistent snapshot without locking them. Backups include stored routines, triggers and events, with binary columns written as hex. The output streams into the encrypted archive as it is produced. Row counts are read from the dump stream itself, so they match the rows in the backup even while the database is being written to.

Amazon RDS and Aurora (MySQL)

Managed MySQL on RDS does not grant SUPER privileges, but SafeGrd does not need them.