{"id":20612401,"url":"https://github.com/skynet2/db-backup","last_synced_at":"2025-10-15T08:19:54.889Z","repository":{"id":59966232,"uuid":"537784212","full_name":"skynet2/db-backup","owner":"skynet2","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-23T17:04:52.000Z","size":139,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-05T14:45:22.065Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/skynet2.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}},"created_at":"2022-09-17T11:14:24.000Z","updated_at":"2024-11-23T17:02:16.000Z","dependencies_parsed_at":"2024-01-23T01:42:54.508Z","dependency_job_id":"ad464903-225e-41f8-90f1-35964a678705","html_url":"https://github.com/skynet2/db-backup","commit_stats":{"total_commits":14,"total_committers":1,"mean_commits":14.0,"dds":0.0,"last_synced_commit":"35e9dfb6da524bd8e86757b0e0eb43177b8aeb6c"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skynet2%2Fdb-backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skynet2%2Fdb-backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skynet2%2Fdb-backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skynet2%2Fdb-backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skynet2","download_url":"https://codeload.github.com/skynet2/db-backup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242259912,"owners_count":20098429,"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-16T10:24:18.413Z","updated_at":"2025-10-15T08:19:49.842Z","avatar_url":"https://github.com/skynet2.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## DB-BACKUP Tool\n\n![build workflow](https://github.com/skynet2/db-backup/actions/workflows/release.yaml/badge.svg?branch=master)\n[![go-report](https://goreportcard.com/badge/github.com/skynet2/db-backup)](https://goreportcard.com/report/github.com/skynet2/db-backup)\n[![PkgGoDev](https://pkg.go.dev/badge/github.com/skynet2/db-backup)](https://pkg.go.dev/github.com/skynet2/db-backup?tab=doc)\n\n### Simple database backup tool with support for remote storage.\n\n## Supported databases (providers)\n- [x] postgres (requires pg_dump)\n- [ ] mssql\n\n## Supported storages (providers)\n- [x] s3\n- [x] s3 compatible (provider = s3)\n- [ ] ftp\n\n## Supported notification channels (providers)\n- [x] discord\n- [x] telegram\n- [x] mattermost\n- [ ] slack\n\n## Configuration example\n```yml\nexclude_dbs:\n  - stats\ndb:\n  provider: postgres\n  dump_dir: \"/var/backup/\"\n  postgres:\n    host: \"127.0.0.1\"\n    port: 5432\n    user: postgres\n    password: qwerty\n    db_default_name: postgres\n    tls_enabled: false\nstorage:\n  provider: s3\n  dir_template: \"{{.Host}}/{{.DbName}}\"\n  max_files: 3\n  s3:\n    region: \"nl-ams\"\n    endpoint: \"https://s3.nl-ams.scw.cloud\"\n    bucket: \"myawesomebacket\"\n    access_key: \"access_key\"\n    secret_key: \"secret_key\"\n    disable_ssl: true\n    force_path_style: false\nnotifications:\n  success:\n    channels:\n      - type: telegram\n        token: \"bot_token\"\n        chat: \"chat_id\"\n      - type: discord\n        webhook: \"https://my-discord-webhook-url\"\n```\n### Configuration fields\n* include_dbs - include only specified databases in backup job\n* exclude_dbs - exclude specific databases from backup job\n* db - database connection settings\n  * provider - database provider (ex. postgres)\n  * dump_dir - temporary directory for backup process\n  * postgres - postgres provider configuration\n    * host - server ip\\hostname\n    * port - port\n    * user - user\n    * password - password\n    * db_default_name - default database name (postgres)\n    * tls_enabled - tls configuration (true\\false)\n    * compression_level = database compression level (pg_dump configuration), 5 by default\n* storage\n  * provider - storage provider (ex. s3)\n  * dir_template - golang template for remote directory. supported values : {{.Host}} and {{.DbName}}\n  * max_files - max remote backups for specific database. For example max_files = 5 and if we already have 5 files for that database at remote storage, the oldest file will be removed\n  * s3 - s3 provider configuration\n    * region - region\n    * endpoint - endpoint (s3 compatible storages)\n    * bucket - bucket\n    * access_key - access_key\n    * secret_key - secret_key\n    * disable_ssl - disable_ssl (true\\false)\n    * force_path_style - force_path_style (true\\false)\n* Notifications\n  * success - will be called on success \n    * channels - array of notification channels\n      * type - channel type (ex. discord or telegram)\n      * token - required for telegram (bot token)\n      * chat - chat_id (telegram)\n      * webhook - webhook url (discord)\n    * template - custom go template\n  * fail - exactly same as success, but will be executed on fail or error. if fail - empty, success will be used\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskynet2%2Fdb-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskynet2%2Fdb-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskynet2%2Fdb-backup/lists"}