> ## Documentation Index
> Fetch the complete documentation index at: https://snapr.seshuk.im/llms.txt
> Use this file to discover all available pages before exploring further.

# MariaDB

> Back up MariaDB with mariadb-dump (mysqldump fallback). Configuration is identical to the MySQL source.

`type: mariadb` produces a logical dump using `mariadb-dump` when available, falling back to `mysqldump`.

The configuration is identical to [MySQL](/configuration/sources/mysql) — both tools accept the same flags. snapr picks the binary at runtime; you do not select it in the config.

## Example

```yaml snapr.yaml theme={null}
sources:
  - type: mariadb
    host: db.internal
    port: 3306
    username: backup
    password: env:MARIADB_PASSWORD
    database: app
    extraParams:
      single-transaction: ''
```

## Options

Same as [MySQL](/configuration/sources/mysql#options). All options apply.

## Requirements

* Either `mariadb-dump` (preferred) or `mysqldump` must be installed on the snapr host and available in `PATH`. snapr looks up `mariadb-dump` first; if it is missing, it falls back to `mysqldump`. Install at least one.
* Install via the `mariadb-client` package on Debian/Ubuntu (provides `mariadb-dump`), or `mysql-client` for the fallback.
* The backup user needs the same grants as MySQL: at minimum `SELECT`, `LOCK TABLES`, `SHOW VIEW`, `EVENT`, `TRIGGER`, `PROCESS`.

## Notes

* For mixed MySQL/MariaDB hosts, prefer the matching client package — flag compatibility is good but not perfect across major versions.

### All databases

```yaml snapr.yaml theme={null}
sources:
  - type: mariadb
    host: db.internal
    username: backup
    password: env:MARIADB_PASSWORD
    allDatabases: true
```

## Related

* [Sources overview](/configuration/sources/overview)
* [MySQL source](/configuration/sources/mysql)
