{"id":47619884,"url":"https://github.com/vineethkrishnan/backupctl","last_synced_at":"2026-04-01T21:58:26.440Z","repository":{"id":345706003,"uuid":"1185389800","full_name":"vineethkrishnan/backupctl","owner":"vineethkrishnan","description":"Multi-project backup orchestration service for PostgreSQL, MySQL \u0026 MongoDB with Restic storage, GPG encryption, scheduled runs, notifications, audit trails, crash recovery, and a 14-command CLI. One YAML, zero babysitting.","archived":false,"fork":false,"pushed_at":"2026-03-20T19:39:52.000Z","size":2024,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-21T01:27:55.856Z","etag":null,"topics":["backup","cli","nest","restic-backups"],"latest_commit_sha":null,"homepage":"https://backupctl.pages.dev","language":"TypeScript","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/vineethkrishnan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-18T14:33:04.000Z","updated_at":"2026-03-20T19:21:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/vineethkrishnan/backupctl","commit_stats":null,"previous_names":["vineethkrishnan/backupctl"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/vineethkrishnan/backupctl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vineethkrishnan%2Fbackupctl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vineethkrishnan%2Fbackupctl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vineethkrishnan%2Fbackupctl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vineethkrishnan%2Fbackupctl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vineethkrishnan","download_url":"https://codeload.github.com/vineethkrishnan/backupctl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vineethkrishnan%2Fbackupctl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31292631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: 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","cli","nest","restic-backups"],"created_at":"2026-04-01T21:58:24.023Z","updated_at":"2026-04-01T21:58:26.430Z","avatar_url":"https://github.com/vineethkrishnan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cstrong\u003ebackupctl\u003c/strong\u003e\u003cbr\u003e\n  \u003cem\u003eBackup orchestration for databases, files, or both. One config, zero babysitting.\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://nestjs.com/\"\u003e\u003cimg src=\"https://img.shields.io/badge/NestJS-11-ea2845?logo=nestjs\u0026logoColor=white\" alt=\"NestJS 11\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.typescriptlang.org/\"\u003e\u003cimg src=\"https://img.shields.io/badge/TypeScript-5.7-3178c6?logo=typescript\u0026logoColor=white\" alt=\"TypeScript\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.docker.com/\"\u003e\u003cimg src=\"https://img.shields.io/badge/Docker-Compose-2496ed?logo=docker\u0026logoColor=white\" alt=\"Docker\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.postgresql.org/\"\u003e\u003cimg src=\"https://img.shields.io/badge/PostgreSQL-16-4169e1?logo=postgresql\u0026logoColor=white\" alt=\"PostgreSQL\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://restic.net/\"\u003e\u003cimg src=\"https://img.shields.io/badge/Restic-0.17-00ADD8\" alt=\"Restic\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://jestjs.io/\"\u003e\u003cimg src=\"https://img.shields.io/badge/Tests-342-c21325?logo=jest\u0026logoColor=white\" alt=\"Jest\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/public/images/09-run-backup.png\" alt=\"backupctl demo\" width=\"720\"\u003e\n\u003c/p\u003e\n\nbackupctl is a standalone Docker service that orchestrates scheduled backups for multiple projects — databases (PostgreSQL, MySQL, MongoDB), files, or both — with encrypted remote storage via [restic](https://restic.net/), configurable notifications, and a full CLI for day-to-day operations.\n\n## Highlights\n\n- **Multi-project** — single service manages dozens of projects from one YAML config\n- **Flexible scope** — back up databases, files, or both per project; PostgreSQL, MySQL, MongoDB out of the box\n- **Restic + Hetzner Storage Box** — encrypted, deduplicated backups over SFTP\n- **GPG encryption** — optional per-project dump encryption before upload\n- **Notifications** — Slack, Email (SMTP/TLS), Webhook (JSON + markdown)\n- **Uptime Kuma monitoring** — optional heartbeat push monitors for passive failure detection\n- **Pre/post hooks** — run arbitrary shell commands around each backup\n- **Retry with backoff** — configurable exponential retry for transient failures\n- **Audit trail** — every run tracked in PostgreSQL with real-time stage progress\n- **Crash recovery** — orphan detection, lock cleanup, fallback replay on startup\n- **15 CLI commands** — backup, restore, status, health, snapshots, prune, logs, config, cache, restic passthrough, upgrade\n- **Dry run** — validates config, adapters, connectivity, disk, and GPG before a real run\n- **Zero-edit install** — interactive wizard generates `.env`, SSH keys, and project config\n\n## Quick Start\n\n```bash\n# One-line install (pulls pre-built image)\ncurl -fsSL https://raw.githubusercontent.com/vineethkrishnan/backupctl/main/scripts/get-backupctl.sh | bash\n\n# Or from source\ngit clone https://github.com/vineethkrishnan/backupctl.git \u0026\u0026 cd backupctl\n./scripts/install.sh\n\n# Verify\ndocker exec backupctl node dist/cli.js health\n\n# Run first backup\ndocker exec backupctl node dist/cli.js run myproject --dry-run\ndocker exec backupctl node dist/cli.js run myproject\n```\n\n```bash\n# Docker Hub\ndocker pull vineethnkrishnan/backupctl:latest\n\n# GitHub Container Registry\ndocker pull ghcr.io/vineethkrishnan/backupctl:latest\n```\n\n## CLI at a Glance\n\n```bash\nbackupctl run \u003cproject\u003e [--dry-run]    # trigger or simulate backup\nbackupctl run --all                    # back up all projects\nbackupctl status [project]             # backup status\nbackupctl health                       # audit DB, restic, disk, SSH\nbackupctl restore \u003cproj\u003e \u003csnap\u003e \u003cpath\u003e # restore from snapshot\nbackupctl snapshots \u003cproject\u003e          # list restic snapshots\nbackupctl prune \u003cproject\u003e | --all      # remove old snapshots\nbackupctl logs \u003cproject\u003e [--failed]    # query audit log\nbackupctl config validate|show|reload  # config management\nbackupctl cache \u003cproject\u003e [--clear]    # restic cache management\nbackupctl restic \u003cproject\u003e \u003ccmd\u003e       # restic passthrough\nbackupctl upgrade                     # check for updates\n```\n\nInside Docker: `docker exec backupctl node dist/cli.js \u003ccommand\u003e`\n\n## Architecture\n\nHexagonal (Ports \u0026 Adapters) with strict layer separation.\n\n```\n                  ┌──────────────────────────────────────┐\n                  │          Infrastructure               │\n                  │   CLI · HTTP · Scheduler  (driving)   │\n                  │              │                        │\n                  │   ┌──────────┴───────────┐           │\n                  │   │   Application Layer   │           │\n                  │   │ Orchestrator·Registry │           │\n                  │   └──────────┬───────────┘           │\n                  │              │                        │\n                  │   ┌──────────┴───────────┐           │\n                  │   │    Domain Layer       │           │\n                  │   │ Ports·Models·Policies │           │\n                  │   └──────────┬───────────┘           │\n                  │              │                        │\n                  │   Adapters (driven)                   │\n                  │   Dumpers·Restic·Notifiers·GPG·Audit  │\n                  └──────────────────────────────────────┘\n```\n\n`infrastructure/` → `application/` → `domain/` — never the reverse.\n\n## Documentation\n\n**[backupctl.vineethnk.in](https://backupctl.vineethnk.in/)** — full documentation site.\n\nAlso available in [`docs/`](docs/README.md):\n\n| #   | Document                                      | What's inside                                              |\n| --- | --------------------------------------------- | ---------------------------------------------------------- |\n| 1   | [Introduction](docs/01-introduction.md)       | Features, design goals, tech stack                         |\n| 2   | [Architecture](docs/02-architecture.md)       | Hexagonal design, layers, naming, project structure        |\n| 3   | [Requirements](docs/03-requirements.md)       | PRD summary, goals, non-goals, audit schema                |\n| 4   | [Installation](docs/04-installation.md)       | Prerequisites, wizard, manual setup, Docker                |\n| 5   | [Configuration](docs/05-configuration.md)     | `.env` reference, `projects.yml` schema, resolution rules  |\n| 6   | [CLI Reference](docs/06-cli-reference.md)     | All 15 commands with syntax, options, exit codes, examples |\n| 7   | [Bash Scripts](docs/07-bash-scripts.md)       | `install.sh`, `dev.sh`, `backupctl-manage.sh`           |\n| 8   | [Backup Flow](docs/08-backup-flow.md)         | 11-step flow, retry, concurrency, recovery, notifications  |\n| 9   | [Restore Guide](docs/09-restore-guide.md)     | Per-DB restore, decrypt, decompress, `--guide`             |\n| 10  | [Cheatsheet](docs/10-cheatsheet.md)           | Daily ops quick reference, one-liners                      |\n| 11  | [Adding Adapters](docs/11-adding-adapters.md) | Extending with new DB engines, notifiers, storage backends |\n| 12  | [Troubleshooting](docs/12-troubleshooting.md) | Common issues, debug commands, log locations               |\n| 16  | [Monitoring](docs/16-monitoring.md)           | Uptime Kuma push monitors, setup, heartbeat details        |\n\n## Tech Stack\n\n| Component      | Technology                          |\n| -------------- | ----------------------------------- |\n| Runtime        | Node.js 20 LTS                      |\n| Framework      | NestJS 11                           |\n| CLI            | nest-commander                      |\n| ORM            | TypeORM (explicit migrations)       |\n| Audit DB       | PostgreSQL 16                       |\n| Scheduler      | @nestjs/schedule                    |\n| Logging        | Winston + daily rotation            |\n| Containers     | Docker + Docker Compose             |\n| Remote storage | Restic → Hetzner Storage Box (SFTP) |\n| Encryption     | GPG                                 |\n| Testing        | Jest (342 tests)                    |\n\n## Contributing\n\n```bash\nnpm install          # install deps\nnpm run start:dev    # dev server (watch)\nnpm test             # run tests\nnpm run lint         # lint\nnpm run build        # production build\n```\n\nSee [Adding Adapters](docs/11-adding-adapters.md) for extending the system.\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvineethkrishnan%2Fbackupctl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvineethkrishnan%2Fbackupctl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvineethkrishnan%2Fbackupctl/lists"}