{"id":19527602,"url":"https://github.com/bugfender/mariadb-backup-s3","last_synced_at":"2026-04-16T17:06:14.556Z","repository":{"id":186065417,"uuid":"665490557","full_name":"bugfender/mariadb-backup-s3","owner":"bugfender","description":null,"archived":false,"fork":false,"pushed_at":"2023-07-12T10:37:22.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-08T16:02:24.071Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bugfender.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-07-12T10:15:55.000Z","updated_at":"2023-07-12T10:37:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"1784ff19-7cc7-4918-90aa-a795463ebc8a","html_url":"https://github.com/bugfender/mariadb-backup-s3","commit_stats":null,"previous_names":["bugfender/mariadb-backup-s3"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugfender%2Fmariadb-backup-s3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugfender%2Fmariadb-backup-s3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugfender%2Fmariadb-backup-s3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugfender%2Fmariadb-backup-s3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bugfender","download_url":"https://codeload.github.com/bugfender/mariadb-backup-s3/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240779308,"owners_count":19856162,"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":[],"created_at":"2024-11-11T01:15:42.521Z","updated_at":"2026-04-16T17:06:14.494Z","avatar_url":"https://github.com/bugfender.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mariadb-backup-s3\n\nThis image does backups of a MariaDB server using Mariabackup to an S3 bucket (or compatible, like Digital Ocean Spaces). Backups are streamed so there is no need for temporary disk space to hold a copy of the database. Optionally, you can set up a S3 bucket lifecycle policy to delete files after a certain amount of days.\n\nLimitations/design decisions are favoring simplicity:\n \n * All backups are full, incremental backups are not supported\n * Backups are not \"prepared\"; they will be prepared when restoring (more efficient backup, slower restore)\n * It does not encrypt the backup files; transmission to the S3 bucket is protected by SSL/TLS and storage might or might not be protected, depending on your S3 bucket configuration\n\n## How does it work?\nIt backs up the database with Mariabackup and streams it to a single lbzip2 compressed file (bzip2 compatible, multi-core port) with xbstream and uploads it to S3 with s3gof3r.\n\nThe backup is a single file with a timestamp name like `20191201-235701.xb`.\n\nWhen first run, if `RETENTION_DAYS` is set, a lifecycle policy will be created and applied.\n\n## Usage\n\nMount the MYSQL data directory on `/var/lib/mysql`.\n\nDefine the following environment variables:\n\n * `MYSQL_USER`\n * `MYSQL_PASSWORD`\n * `MYSQL_HOST`\n * `S3_BUCKET_NAME`\n * `S3_ENDPOINT` (eg. `s3.eu-west-1.amazonaws.com` or `fra1.digitaloceanspaces.com`)\n * `AWS_ACCESS_KEY_ID`\n * `AWS_SECRET_ACCESS_KEY`\n * `AWS_REGION` (eg. `eu-west-1` or `fra1`)\n * `WAIT_SECONDS` (number of seconds to wait between backups, if not set backup is run once)\n * `RETENTION_DAYS` (number of days copies are retained, defaults to not set, which means no retention policy is set on the bucket)\n\n## Restore\n\nStop mysql and run `/restore.sh name_of_object_to_restore.xb.bz2` inside the container. Then start mysql.\n\n## License and credits\n\nThis project is licensed under the Apache 2.0 license, see `LICENSE` for details. This is a fork from https://github.com/mobilejazz/mariadb-backup-s3.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugfender%2Fmariadb-backup-s3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbugfender%2Fmariadb-backup-s3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugfender%2Fmariadb-backup-s3/lists"}