{"id":16129457,"url":"https://github.com/klutchell/balena-restic","last_synced_at":"2026-03-05T05:31:42.356Z","repository":{"id":37077712,"uuid":"485433323","full_name":"klutchell/balena-restic","owner":"klutchell","description":"Rest easy knowing that your application data volumes are automatically and securely backed up to local or cloud storage!","archived":false,"fork":false,"pushed_at":"2024-08-19T13:07:59.000Z","size":301,"stargazers_count":1,"open_issues_count":14,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-02T14:38:05.979Z","etag":null,"topics":["backup","balena","docker","restic","snapshots","volumes"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/klutchell.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-25T15:43:48.000Z","updated_at":"2024-06-04T12:56:27.000Z","dependencies_parsed_at":"2023-02-17T11:45:59.132Z","dependency_job_id":"981a1e13-99de-410a-be0d-0774bcb1dd3f","html_url":"https://github.com/klutchell/balena-restic","commit_stats":{"total_commits":102,"total_committers":3,"mean_commits":34.0,"dds":"0.33333333333333337","last_synced_commit":"87105368e8805e2aeaafb38828a05feeb9e70882"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":"product-os/balena-typescript-skeleton","purl":"pkg:github/klutchell/balena-restic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klutchell%2Fbalena-restic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klutchell%2Fbalena-restic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klutchell%2Fbalena-restic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klutchell%2Fbalena-restic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/klutchell","download_url":"https://codeload.github.com/klutchell/balena-restic/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klutchell%2Fbalena-restic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30111743,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T03:40:26.266Z","status":"ssl_error","status_checked_at":"2026-03-05T03:39:15.902Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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","balena","docker","restic","snapshots","volumes"],"created_at":"2024-10-09T22:10:51.427Z","updated_at":"2026-03-05T05:31:42.324Z","avatar_url":"https://github.com/klutchell.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# balena-restic\n\nRest easy knowing that your application data volumes are automatically and securely backed up to local or cloud storage!\n\n## Features\n\n- automatically mount application volumes\n- encrypted snapshots are uploaded to your choice of local or cloud storage via [restic](https://restic.net/)\n- snapshots are automatically pruned following a configurable retention policy\n- application containers are stopped and restarted following data restore\n\n## Usage\n\nTo use this image, add a service in your `docker-compose.yml` file as shown below.\n\n```yml\nservices:\n  ...\n  restic:\n    # where \u003carch\u003e is one of aarch64, armv7hf or amd64\n    image: bh.cr/gh_klutchell/balena-restic-\u003carch\u003e\n    labels:\n      io.balena.features.supervisor-api: 1\n    volumes:\n      - cache:/cache\n```\n\nTo pin to a specific version of this block use:\n\n```yml\nservices:\n  ...\n  restic:\n    # where \u003cversion\u003e is the release semver or release commit ID\n    image: bh.cr/gh_klutchell/balena-restic-\u003carch\u003e/\u003cversion\u003e\n    labels:\n      io.balena.features.supervisor-api: 1\n    volumes:\n      - cache:/cache\n```\n\n## Customization\n\n### Environment Variables\n\n| Name                | Description                                                                                                                             |\n| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |\n| `RESTIC_REPOSITORY` | [Repository](https://restic.readthedocs.io/en/latest/030_preparing_a_new_repo.html) for encrypted snapshots.                            |\n| `RESTIC_PASSWORD`   | Repository password for encrypted snapshots. Set this once and avoid changing it!                                                       |\n| `BACKUP_CRON`       | Cron schedule for creating backups. See [this page](https://crontab.guru/examples.html) for examples. Default is every 8 hours.         |\n| `TZ`                | The timezone in your location. Find a [list of all timezone values here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). |\n| `BACKUP_OPTS`       | Extra arguments to pass to the [backup](#backup) command.                                                                               |\n| `PRUNE_OPTS`        | Extra arguments to pass to the [prune](#prune) command.                                                                                 |\n| `RESTORE_OPTS`      | Extra arguments to pass to the [restore](#restore) command.                                                                             |\n| `DRY_RUN`           | Set to true to add the `--dry-run` flag to all supported commands.                                                                      |\n| `LOG_LEVEL`         | Control volume of logs sent to console. Default is `info`.\n\nAll restic environment variables are outlined [in their documentation](https://restic.readthedocs.io/en/latest/040_backup.html#environment-variables).\n\n### Backup\n\nBackups are executed automatically on a cron schedule and will back up all local volumes by default.\n\nTo backup manually you must open a shell in the `restic` service either via balena Dashboard or the balena CLI\nand execute the following command(s):\n\n```bash\n# create a new backup with optional args\nnpm run backup --tag=manual-reason\n```\n\nSee all the available backup options here: \u003chttps://restic.readthedocs.io/en/latest/040_backup.html\u003e\n\n## List Snapshots\n\nTo list snapshots you must open a shell in the `restic` service either via balena Dashboard or the balena CLI\nand execute the following command(s):\n\n```bash\n# list snapshots with optional args\nrestic snapshots --group-by=hosts,tags\n```\n\nSee all the available filter options here: \u003chttps://restic.readthedocs.io/en/latest/045_working_with_repos.html#listing-all-snapshots\u003e\n\n### Restore\n\nTo restore a snapshot you must open a shell in the `restic` service either via balena Dashboard or the balena CLI\nand execute the following command(s):\n\n```bash\n# restore a specific snapshot id or 'latest'\nnpm run restore 4bba301e\n```\n\nSee all the available restore options here: \u003chttps://restic.readthedocs.io/en/latest/050_restore.html\u003e\n\n### Prune\n\nSnapshot pruning is performed automatically after every backup following the policy in `PRUNE_OPTS`.\n\nTo manually prune you must open a shell in the `restic` service either via balena Dashboard or the balena CLI\nand execute the following command(s):\n\n```bash\n# prune snapshots following your choice of policy\nnpm run prune --keep-daily=7 --keep-weekly=5 --keep-monthly=12 --keep-yearly=75 --dry-run\n```\n\nSee all the available prune options here: \u003chttps://restic.readthedocs.io/en/latest/060_forget.html\u003e\n\n## Contributing\n\nPlease open an issue or submit a pull request with any features, fixes, or changes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklutchell%2Fbalena-restic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fklutchell%2Fbalena-restic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklutchell%2Fbalena-restic/lists"}