{"id":13461327,"url":"https://github.com/gobackup/gobackup","last_synced_at":"2025-05-13T17:14:33.918Z","repository":{"id":24848241,"uuid":"102588436","full_name":"gobackup/gobackup","owner":"gobackup","description":"🗄 CLI tool for backup your databases, files to cloud storages in schedully.","archived":false,"fork":false,"pushed_at":"2025-05-02T02:28:27.000Z","size":722,"stargazers_count":1526,"open_issues_count":21,"forks_count":241,"subscribers_count":25,"default_branch":"main","last_synced_at":"2025-05-12T06:17:00.676Z","etag":null,"topics":["backup","cli","go","mysql","postgresql","redis"],"latest_commit_sha":null,"homepage":"https://gobackup.github.io","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/gobackup.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,"zenodo":null}},"created_at":"2017-09-06T09:14:52.000Z","updated_at":"2025-05-12T03:52:32.000Z","dependencies_parsed_at":"2023-07-13T13:22:12.191Z","dependency_job_id":"f3c0cd32-ab2d-4c50-83c6-c20f5a062f7e","html_url":"https://github.com/gobackup/gobackup","commit_stats":{"total_commits":359,"total_committers":21,"mean_commits":"17.095238095238095","dds":"0.31754874651810583","last_synced_commit":"4f6ed991ca9b5e1cd390fa0e9ba82d361a96a9f9"},"previous_names":["huacnlee/gobackup"],"tags_count":71,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gobackup%2Fgobackup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gobackup%2Fgobackup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gobackup%2Fgobackup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gobackup%2Fgobackup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gobackup","download_url":"https://codeload.github.com/gobackup/gobackup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253990500,"owners_count":21995776,"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","cli","go","mysql","postgresql","redis"],"created_at":"2024-07-31T11:00:34.567Z","updated_at":"2025-05-13T17:14:28.905Z","avatar_url":"https://github.com/gobackup.png","language":"Go","readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/5518/205909959-12b92929-4ac5-4bb5-9111-6f9a3ed76cf6.png\" width=\"160\" /\u003e\n\n\u003ch1 align=\"center\"\u003eGoBackup\u003c/h1\u003e\n\u003cp align=\"center\"\u003eCLI tool for backup your databases, files to cloud storages in schedully.\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n   \u003ca href=\"https://github.com/gobackup/gobackup/actions?query=workflow%3AGo\"\u003e\u003cimg src=\"https://github.com/gobackup/gobackup/actions/workflows/test.yml/badge.svg\" alt=\"Build Status\" /\u003e\u003c/a\u003e\n   \u003ca href=\"https://github.com/gobackup/gobackup/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/gobackup/gobackup?label=Version\u0026color=1\" alt=\"GitHub release (latest by date)\"\u003e\u003c/a\u003e\n   \u003ca href=\"https://hub.docker.com/r/huacnlee/gobackup\"\u003e\u003cimg src=\"https://img.shields.io/docker/v/huacnlee/gobackup?label=Docker\u0026color=blue\" alt=\"Docker Image Version (latest server)\"\u003e\u003c/a\u003e\n   \u003ca href=\"https://formulae.brew.sh/formula/gobackup\"\u003e\u003cimg alt=\"homebrew version\" src=\"https://img.shields.io/homebrew/v/gobackup?color=success\u0026label=Brew\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nGoBackup is a backup tool design for application servers, to backup your databases, files to cloud storages (FTP, SCP, S3, GCS, Aliyun OSS ...) in schedully.\n\nSimple, easy to use, one time setup, run years without any maintenance, low cost (recycle), secure (encrypt compress).\n\n\u003e Inspired by [backup/backup](https://github.com/backup/backup) and replace it for without Ruby dependency.\n\n[![asciicast](https://asciinema.org/a/543564.svg)](https://asciinema.org/a/543564)\n\nGoBackup 是一个为中小型服务器而设计备份工具，内置计划任务，帮你定时备份数据库、配置文件，通过导出、打包压缩，最终存储到外部云存储（如：FTP、SCP、S3、GCS、Aliyun OSS ...）。\n\n简单易用，一次性部署后能持续运行数年无需任何维护，存储成本低（回收机制），安全可靠（加密压缩）。\n\n\u003e 🎈 [Ruby China](https://ruby-china.org) 的应用服务器从 GoBackup 设计之初（2017 年）开始就每日全量备份到外部的云存储，并持续数年一直默默的备份着，完全不需要维护。Aliyun OSS 上，每月成本仅为 0.2 RMB（文件回收周期为 1 个月）。\n\nhttps://gobackup.github.io\n\n## Features\n\n- No dependencies.\n- Multiple Databases source support.\n- Multiple Storage type support.\n- Archive paths or files into a tar.\n- Split large backup file into multiple parts.\n- Run as daemon to backup in schedully.\n- Web UI to manage backups.\n\n### Databases\n\n- MySQL\n- PostgreSQL\n- Redis\n- MongoDB\n- SQLite\n- Microsoft SQL Server\n- InfluxDB\n- MariaDB\n- etcd\n\n### Storages\n\n- Local\n- FTP\n- SFTP\n- SCP - Upload via SSH copy\n- [Amazon S3](https://aws.amazon.com/s3)\n- [Aliyun OSS](https://www.aliyun.com/product/oss)\n- [Google Cloud Storage](https://cloud.google.com/storage)\n- [Azure Blob Storage](https://azure.microsoft.com/en-us/products/storage/blobs)\n- [Backblaze B2 Cloud Storage](https://www.backblaze.com/b2)\n- [Cloudflare R2](https://www.cloudflare.com/products/r2)\n- [DigitalOcean Spaces](https://www.digitalocean.com/products/spaces)\n- [QCloud COS](https://cloud.tencent.com/product/cos)\n- [UCloud US3](https://docs.ucloud.cn/ufile/introduction/concept)\n- [Qiniu Kodo](https://www.qiniu.com/products/kodo)\n- [Baidu BOS](https://cloud.baidu.com/product/bos.html)\n- [MinIO](https://min.io)\n- [Huawei OBS](https://www.huaweicloud.com/intl/en-us/product/obs.html)\n- [Volcengine TOS](https://www.volcengine.com/product/tos)\n- [UpYun](https://upyun.com)\n- [WebDAV](http://www.webdav.org)\n\n## Notifier\n\n\u003e since: 1.5.0\n\nSend notification when backup has success or failed.\n\n- Mail (SMTP)\n- Webhook\n- Discord\n- Slack\n- Feishu\n- DingTalk\n- GitHub (Comment on Issue)\n- Telegram\n- AWS SES\n- Postmark\n- SendGrid\n\n## Installation\n\n```shell\ncurl -sSL https://gobackup.github.io/install | sh\n```\n\nafter that, you will get `/usr/local/bin/gobackup` command.\n\n### Install via Homebrew\n\n```shell\nbrew install gobackup\n```\n\n```bash\n$ gobackup -h\nNAME:\n   gobackup - Backup your databases, files to FTP / SCP / S3 / GCS and other cloud storages.\n\nUSAGE:\n   gobackup [global options] command [command options] [arguments...]\n\nVERSION:\n   1.3.0\n\nCOMMANDS:\n   perform\n   start    Start as daemon\n   run      Run GoBackup\n   help, h  Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --help, -h     show help (default: false)\n   --version, -v  print the version (default: false)\n```\n\n## Configuration\n\nGoBackup will seek config files in:\n\n- ~/.gobackup/gobackup.yml\n- /etc/gobackup/gobackup.yml\n\nExample config: [gobackup_test.yml](https://github.com/huacnlee/gobackup/blob/master/gobackup_test.yml)\n\n```yml\nmodels:\n  gitlab_app:\n    databases:\n      gitlab_db:\n        type: postgresql\n        database: gitlab_production\n        username: gitlab\n        password:\n      gitlab_redis:\n        type: redis\n        mode: sync\n        rdb_path: /var/db/redis/dump.rdb\n        invoke_save: true\n    storages:\n      s3:\n        type: s3\n        bucket: my_app_backup\n        region: us-east-1\n        path: backups\n        access_key_id: $S3_ACCESS_KEY_Id\n        secret_access_key: $S3_SECRET_ACCESS_KEY\n    compress_with:\n      type: tgz\n```\n\n## Usage\n\n### Perform backup\n\n```bash\n$ gobackup perform\n```\n\n### Backup schedule\n\nGoBackup built in a daemon mode, you can use `gobackup start` to start it.\n\nYou can configure the `schedule` for each models, it will run backup task at the time you set.\n\n#### For example\n\nConfigure your schedule in `gobackup.yml`\n\n```yml\nmodels:\n  my_backup:\n    before_script: |\n      echo \"Before script\"\n    after_script: |\n      echo \"After script\"\n    schedule:\n      # At 04:05 on Sunday.\n      cron: \"5 4 * * sun\"\n    storages:\n      local:\n        type: local\n        path: /path/to/backups\n    databases:\n      mysql:\n        type: mysql\n        host: localhost\n        port: 3306\n        database: my_database\n        username: root\n        password: password\n  other_backup:\n    # At 04:05 on every day.\n    schedule:\n      every: \"1day\",\n      at: \"04:05\"\n    storages:\n      local:\n        type: local\n        path: /path/to/backups\n    databases:\n      mysql:\n        type: mysql\n        host: localhost\n        port: 3306\n        database: my_database\n        username: root\n        password: password\n```\n\n### Start Daemon \u0026 Web UI\n\nGoBackup bulit a HTTP Server for Web UI, you can start it by `gobackup start`.\n\nIt also will handle the backup schedule.\n\n```bash\n$ gobackup start\n\n2023/03/15 23:00:30 [Config] Load config from default path.\nStarting API server on port http://127.0.0.1:2703\n```\n\n\u003e NOTE: If you wants start without daemon, use `gobackup run` instead.\n\nNow visit http://127.0.0.1:2703 you can see the Web UI:\n\n![gobackup-webui-main](https://user-images.githubusercontent.com/5518/225351245-90ff1eab-673a-44c7-bf37-d1964af24e12.png)\n![gobackup-webui-files](https://user-images.githubusercontent.com/5518/225351184-32d9ada9-2faf-45a3-a7f3-10d41feffb8c.png)\n\n### Signal handling\n\nGoBackup will handle the following signals:\n\n- `HUP` - Hot reload configuration.\n- `QUIT` - Graceful shutdown.\n\n```bash\n$ ps aux | grep gobackup\njason            20443   0.0  0.1 409232800   8912   ??  Ss    7:47PM   0:00.02 gobackup run\n\n# Reload configuration\n$ kill -HUP 20443\n# Exit daemon\n$ kill -QUIT 20443\n```\n\n## Contributing\n\nThe [DEVELOPMENT](./DEVELOPMENT) document will help you to setup development environment, and guide you how to test them in local.\n\nWhen you finish your work, please send a PR.\n\n## License\n\nMIT\n","funding_links":[],"categories":["Go","A list of FOSS backup software","Backup","postgresql"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgobackup%2Fgobackup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgobackup%2Fgobackup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgobackup%2Fgobackup/lists"}