{"id":16592921,"url":"https://github.com/huskydog9988/docker-db-backup","last_synced_at":"2026-05-02T20:37:02.520Z","repository":{"id":214809463,"uuid":"736414022","full_name":"Huskydog9988/docker-db-backup","owner":"Huskydog9988","description":"A tool to automatically backup databases running in docker","archived":false,"fork":false,"pushed_at":"2024-06-12T19:51:14.000Z","size":57,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-17T08:47:53.506Z","etag":null,"topics":["backup","backup-tool","backup-utility","database","go","golang","postgres","postgresql"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Huskydog9988.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2023-12-27T20:56:43.000Z","updated_at":"2024-06-12T19:49:52.000Z","dependencies_parsed_at":"2024-02-03T17:24:14.563Z","dependency_job_id":"3ef1082d-dd09-4466-8ef3-9aa31f36eb7e","html_url":"https://github.com/Huskydog9988/docker-db-backup","commit_stats":null,"previous_names":["huskydog9988/docker-db-backup"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/Huskydog9988/docker-db-backup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Huskydog9988%2Fdocker-db-backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Huskydog9988%2Fdocker-db-backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Huskydog9988%2Fdocker-db-backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Huskydog9988%2Fdocker-db-backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Huskydog9988","download_url":"https://codeload.github.com/Huskydog9988/docker-db-backup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Huskydog9988%2Fdocker-db-backup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32549384,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T19:18:06.202Z","status":"ssl_error","status_checked_at":"2026-05-02T19:16:21.335Z","response_time":132,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","backup-tool","backup-utility","database","go","golang","postgres","postgresql"],"created_at":"2024-10-11T23:22:55.907Z","updated_at":"2026-05-02T20:36:57.512Z","avatar_url":"https://github.com/Huskydog9988.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker Db Backup\n\n\u003e Automatically find and backup databases running in docker containers\n\nThe script will find all running containers based on a set of rules defined in the config file. It will then attempt to find a container matching that rule, and dump it.\n\nExanple config file:\n\n```yaml\nconfig:\n  # folder where the dump files will be stored\n  dumpFolder: \"./out\"\n\n  # optional: allows you to specify the max number of jobs to run at once\n  jobLimit: 1\n\n  # optional: allows you start an http server and trigger jobs via an api\n  httpServer:\n    enabled: true\n\njobs:\n  # job name\n  testRegex:\n    # Database type: postgres, mysql (coming soon)\n    dbType: postgres\n    # Match method: regex, exact\n    matchMethod: regex\n    # Will match any container name starting with \"test-postgres\"\n    match: \"^test-postgres\"\n    # Cron schedule\n    # run every 5 minutes\n    cron: \"*/5 * * * *\"\n    # optional: allows you to specify a custom db user for cmd to use\n    dbUser: \"postgres\"\n\n  # job name\n  textExact:\n    dbType: postgres\n    # Will match any container name exactly matching \"postgres\"\n    matchMethod: exact\n    match: \"postgres\"\n    cron: \"*/5 * * * *\"\n```\n\n\u003e [Config.yaml](config.yaml) serves as another example used in testing if you want to see more practical usage\n\nThe script looks for the config file in the same directory it is being run from. Or in other words, the current working directory.\n\n## Example usage\n\n(Assuming you have the repo cloned)\n\n```bash\n# Start test containers\n(cd test \u0026\u0026 docker-compose up -d)\n\n# Run the script\ngo run .\n\n# Or use the docker image\ndocker run --rm -it -v \"$PWD:$PWD\" -w \"$PWD\" ghcr.io/huskydog9988/docker-db-backup:latest\n```\n\nThe script will then dump the databases to the `out` folder, and continue to run every 5 minutes because of the cron option.\n\n## API\n\n\u003e This feature requires the `httpServer` option to be enabled in the config file\n\nThe script can also start an http server and trigger jobs via an api. This is useful if you want to trigger a job elsewhere, like from another backup service.\n\nTo trigger a job, send a GET request to `http://localhost:3333/api/v1/queueJob?jobName=JOB_NAME`.\n\nExample using the example config file:\n\n```bash\ncurl http://localhost:3333/api/v1/queueJob?jobName=testRegex\n```\n\nThe server will respond with a 200 status code **after** the job has finished running. Currently, there is no way to check if the job has failed or not.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuskydog9988%2Fdocker-db-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuskydog9988%2Fdocker-db-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuskydog9988%2Fdocker-db-backup/lists"}