{"id":16031769,"url":"https://github.com/realorangeone/docker-db-auto-backup","last_synced_at":"2025-04-05T04:08:33.976Z","repository":{"id":37012752,"uuid":"404490064","full_name":"RealOrangeOne/docker-db-auto-backup","owner":"RealOrangeOne","description":"A script to automatically back up all databases running under docker on a host","archived":false,"fork":false,"pushed_at":"2025-03-25T11:10:50.000Z","size":136,"stargazers_count":143,"open_issues_count":16,"forks_count":18,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-29T03:02:19.184Z","etag":null,"topics":["backup","database","docker","mariadb","mysql","postgresql"],"latest_commit_sha":null,"homepage":"https://theorangeone.net/projects/docker-db-auto-backup/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RealOrangeOne.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"RealOrangeOne","ko_fi":"theorangeone","liberapay":"theorangeone","custom":["https://theorangeone.net/support/"]}},"created_at":"2021-09-08T20:44:23.000Z","updated_at":"2025-03-25T09:05:35.000Z","dependencies_parsed_at":"2023-10-23T21:26:16.410Z","dependency_job_id":"89fc3f83-977f-4a86-839c-3a1973702f65","html_url":"https://github.com/RealOrangeOne/docker-db-auto-backup","commit_stats":{"total_commits":122,"total_committers":7,"mean_commits":"17.428571428571427","dds":0.4098360655737705,"last_synced_commit":"5fca86bfd0f855e713cbb91e60ff4ba9539ecf05"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RealOrangeOne%2Fdocker-db-auto-backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RealOrangeOne%2Fdocker-db-auto-backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RealOrangeOne%2Fdocker-db-auto-backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RealOrangeOne%2Fdocker-db-auto-backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RealOrangeOne","download_url":"https://codeload.github.com/RealOrangeOne/docker-db-auto-backup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247284944,"owners_count":20913704,"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","database","docker","mariadb","mysql","postgresql"],"created_at":"2024-10-08T21:05:31.535Z","updated_at":"2025-04-05T04:08:33.926Z","avatar_url":"https://github.com/RealOrangeOne.png","language":"Python","funding_links":["https://github.com/sponsors/RealOrangeOne","https://ko-fi.com/theorangeone","https://liberapay.com/theorangeone","https://theorangeone.net/support/"],"categories":[],"sub_categories":[],"readme":"# docker-db-auto-backup\n\n![](https://github.com/RealOrangeOne/docker-db-auto-backup/workflows/CI/badge.svg)\n\nA script to automatically back up all databases running under docker on a host, with optional compression support.\n\n## Supported databases\n\n- MySQL (including MariaDB and LSIO's MariaDB)\n- PostgreSQL (including [TimescaleDB](https://www.timescale.com/), [pgvecto.rs](https://github.com/tensorchord/pgvecto.rs), and Nextcloud's [AIO](https://github.com/nextcloud/all-in-one))\n- Redis\n\n## Installation\n\nThis container requires access to the docker socket. This can be done either by mounting `/var/lib/docker.sock`, or using a HTTP proxy to provide it through `$DOCKER_HOST`.\n\nMount your backup directory as `/var/backups` (or override `$BACKUP_DIR`). Backups will be saved here based on the name of the container. Backups are not dated or compressed.\n\nBackups run daily at midnight. To change this, add a cron-style schedule to `$SCHEDULE`. For more information on the format of the cron strings, please see the [croniter documentation on PyPI](https://pypi.org/project/croniter/).\n\n### Success hooks\n\nWhen backups are completed successfully, a request can be made to the URL defined in `$SUCCESS_HOOK_URL`. By default, a `GET` request is made. To include logs, also set `$INCLUDE_LOGS` to a non-empty value, which sends a `POST` request instead with helpful details in the body.\n\nNote: Previous versions also supported `$HEALTHCHECKS_ID`, `$HEALTHCHECKS_HOST` and `$UPTIME_KUMA_URL`, or native support for [healthchecks.io](https://healthchecks.io) and [Uptime Kuma](https://github.com/louislam/uptime-kuma/) respectively. These are all still supported, however `$SUCCESS_HOOK_URL` is preferred.\n\n### Compression\n\nFiles are backed up uncompressed by default, on the assumption a snapshotting or native compressed filesystem is being used (eg ZFS). To enable compression, set `$COMPRESSION` to one of the supported algorithms:\n\n- `gzip`\n- `lzma` / `xz`\n- `bz2`\n- `plain` (no compression - the default)\n\n### Example `docker-compose.yml`\n\n```yml\nversion: \"2.3\"\n\nservices:\n  backup:\n    image: ghcr.io/realorangeone/db-auto-backup:latest\n    restart: unless-stopped\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock:ro\n      - ./backups:/var/backups\n    environment:\n      - SUCCESS_HOOK_URL=https://hc-ping.com/1234\n      - INCLUDE_LOGS=true\n```\n\n### Oneshot\n\nYou may want to use this container to run backups just once, rather than on a schedule. To achieve this, set `$SCHEDULE` to an empty string, and the backup will run just once. This may be useful in conjunction with an external scheduler.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealorangeone%2Fdocker-db-auto-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frealorangeone%2Fdocker-db-auto-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealorangeone%2Fdocker-db-auto-backup/lists"}