{"id":14969075,"url":"https://github.com/bfren/docker-mariadb","last_synced_at":"2026-02-11T10:03:03.003Z","repository":{"id":37041986,"uuid":"305693654","full_name":"bfren/docker-mariadb","owner":"bfren","description":"Docker MariaDB image with automatic backups.","archived":false,"fork":false,"pushed_at":"2024-10-26T14:10:33.000Z","size":465,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-30T03:48:32.438Z","etag":null,"topics":["backup","docker","docker-mariadb","mariadb","mariadb-server","mysql"],"latest_commit_sha":null,"homepage":"","language":"Nushell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bfren.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"bfren","patreon":"bfren"}},"created_at":"2020-10-20T12:00:56.000Z","updated_at":"2024-10-26T14:10:25.000Z","dependencies_parsed_at":"2023-10-13T10:38:01.895Z","dependency_job_id":"48aa257b-e4ba-4d07-8dc1-48a0cb92ea07","html_url":"https://github.com/bfren/docker-mariadb","commit_stats":{"total_commits":301,"total_committers":2,"mean_commits":150.5,"dds":"0.21594684385382057","last_synced_commit":"d589f6280706e346cf565f569c05cdf2fe352f1e"},"previous_names":[],"tags_count":182,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfren%2Fdocker-mariadb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfren%2Fdocker-mariadb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfren%2Fdocker-mariadb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfren%2Fdocker-mariadb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bfren","download_url":"https://codeload.github.com/bfren/docker-mariadb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238276073,"owners_count":19445344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup","docker","docker-mariadb","mariadb","mariadb-server","mysql"],"created_at":"2024-09-24T13:41:05.672Z","updated_at":"2026-01-29T01:02:30.916Z","avatar_url":"https://github.com/bfren.png","language":"Nushell","funding_links":["https://github.com/sponsors/bfren","https://patreon.com/bfren"],"categories":[],"sub_categories":[],"readme":"# Docker MariaDB\n\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/bfren/docker-mariadb) ![Docker Pulls](https://img.shields.io/endpoint?url=https%3A%2F%2Fbfren.dev%2Fdocker%2Fpulls%2Fmariadb) ![Docker Image Size](https://img.shields.io/endpoint?url=https%3A%2F%2Fbfren.dev%2Fdocker%2Fsize%2Fmariadb) ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/bfren/docker-mariadb/dev.yml?branch=main)\n\n[Docker Repository](https://hub.docker.com/r/bfren/mariadb) - [bfren ecosystem](https://github.com/bfren/docker)\n\n[MariaDB](https://mariadb.org/) comes pre-installed (10.6 LTS, 10.11 LTS, 11.4 LTS, 11.8 LTS and 12.0.1) with automatic backups built-in.\n\n**If you are upgrading to 7.x please read [this page](UPGRADE_FROM_6x_TO_7x.md).**\n\n## Contents\n\n* [Automatic Backups](#automatic-backups)\n* [Ports](#ports)\n* [Volumes](#volumes)\n* [Environment Variables](#environment-variables)\n* [Helper Functions](#helper-functions)\n* [Licence / Copyright](#licence)\n\n## Automatic Backups\n\nBackups for every database (except `mysql`, `information_schema`, `performance_schema`, and `sys`) are stored:\n\n* in the `/backup` volume\n* in subfolders by date and time (yyMMddhhmm)\n* every eight hours\n\nSee [For Backups](#for-backups) for configuration variables.\n\n**It is strongly recommended that you run a backup before updating to a more recent version.**\n\n## Ports\n\n* 3306\n\n## Volumes\n\n| Volume    | Purpose                                                                                           |\n| --------- | ------------------------------------------------------------------------------------------------- |\n| `/backup` | Backup files (also used for export / import scripts - see [helper functions](#helper-functions)). |\n| `/data`   | Data files.                                                                                       |\n| `/ssl`    | SSL certificates and files.                                                                       |\n\n## Environment Variables\n\n### For Backups\n\n| Variable                          | Values                                                                    | Description                                                       | Default   |\n| --------------------------------- | ------------------------------------------------------------------------- | ----------------------------------------------------------------- | --------- |\n| `BF_DB_BACKUP_COMPRESS_FILES`     | 0 or 1                                                                    | Whether or not to compress backup files (using gzip).             | 0         |\n| `BF_DB_BACKUP_KEEP_FOR`           | [Nu duration](https://www.nushell.sh/book/types_of_data.html#durations)   | The period of time to keep backups before auto-deleting them.     | 28day     |\n\n### For SSL\n\n| Variable                      | Values                                                                    | Description                                                               | Default   |\n| ----------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | --------- |\n| `BF_DB_SSL_ENABLE`            | 0 or 1                                                                    | Set to \"1\" to enable SSL support.                                         | 0         |\n| `BF_DB_SSL_EXPIRY`            | [Nu duration](https://www.nushell.sh/book/types_of_data.html#durations)   | The period of time before self-generated SSL certificates will expire.    | 36500day  |\n| `BF_DB_SSL_CA_KEY_BITS`       | integer                                                                   | The size in bits of the CA SSL private key.                               | 4096      |\n| `BF_DB_SSL_SERVER_KEY_BITS`   | integer                                                                   | The size in bits of the server SSL private key.                           | 4096      |\n| `BF_DB_SSL_CLIENT_KEY_BITS`   | integer                                                                   | The size in bits of the client SSL private key.                           | 4096      |\n\n### For Database\n\n| Variable              | Values    | Description                                                                                                       | Default               |\n| --------------------- | --------- | ----------------------------------------------------------------------------------------------------------------- | --------------------- |\n| `BF_DB_ROOT_PASSWORD` | string    | Password for root user.                                                                                           | *None* - **required** |\n| `BF_DB_APPLICATION`   | string    | Application name - will be used as `BF_DB_DATABASE`, `BF_DB_PASSWORD` and `BF_DB_USERNAME` if they are not set.   | *None*                |\n| `BF_DB_DATABASE`      | string    | Database name(s) - multiple databases can be separated by a comma.                                                | *None*                |\n| `BF_DB_USERNAME`      | string    | Application username - required if `BF_DB_APPLICATION` is not used.                                               | *None*                |\n| `BF_DB_PASSWORD`      | string    | Application password - required if `BF_DB_APPLICATION` is not used.                                               | *None*                |\n| `BF_DB_SUPER_USER`    | 0 or 1    | Grants the application user permission to **all** databases plus user management - **not** for production.        | 0                     |\n| `BF_DB_CHARACTER_SET` | string    | Sets [character_set_server](https://mariadb.com/kb/en/server-system-variables/#character_set_server).             | utf8                  |\n| `BF_DB_COLLATION`     | string    | Sets [collation_server](https://mariadb.com/kb/en/server-system-variables/#collation_server).                     | utf8_general_ci       |\n| `BF_DB_LOG_WARNINGS`  | string    | Sets [log_warnings](https://mariadb.com/kb/en/server-system-variables/#log_warnings).                             | 2                     |\n\n## Helper Functions\n\n| Function                  | Arguments         | Purpose                                                                               | Usage                                                 |\n| ------------------------- | ----------------- | ------------------------------------------------------------------------------------- | ----------------------------------------------------- |\n| `db-backup`               | *None*            | Run backup manually.                                                                  | `docker exec \u003c\u003cCONTAINER\u003e\u003e db-backup`                 |\n| `db-export`               | 1: Database name  | Dumps the specified database as a SQL file to the root of the `/backup` volume.       | `docker exec \u003c\u003cCONTAINER\u003e\u003e db-export \u003c\u003cDB_NAME\u003e\u003e`     |\n| `db-import`               | 1: Database name  | Executes all files in the root of the `/backup` volume.                               | `docker exec \u003c\u003cCONTAINER\u003e\u003e db-import \u003c\u003cDB_NAME\u003e\u003e`     |\n| `db-restore`              | 1: Backup set     | Deletes all files in `/data` volume, then restores from the specified backup dump.    | `docker exec \u003c\u003cCONTAINER\u003e\u003e db-restore 202107180500`   |\n| `db-upgrade`              | *None*            | Run `mariadb-upgrade` manually - normally not necessary but performs various checks.  | `docker exec \u003c\u003cCONTAINER\u003e\u003e db-upgrade`                |\n| `db-enable-super-user`    | *None*            | Give the application user permission to access all database and manage users.         | `docker exec \u003c\u003cCONTAINER\u003e\u003e db-enable-super-user`      |\n| `db-disable-super-user`   | *None*            | Give the application user permission only to access application databases.            | `docker exec \u003c\u003cCONTAINER\u003e\u003e db-disable-super-user`     |\n\n## Licence\n\n\u003e [MIT](https://mit.bfren.dev/2020)\n\n## Copyright\n\n\u003e Copyright (c) 2020-2026 [bfren](https://bfren.dev) (unless otherwise stated)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbfren%2Fdocker-mariadb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbfren%2Fdocker-mariadb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbfren%2Fdocker-mariadb/lists"}