{"id":19586350,"url":"https://github.com/tbobm/pass-backup","last_synced_at":"2026-04-15T15:34:41.649Z","repository":{"id":104230773,"uuid":"443430910","full_name":"tbobm/pass-backup","owner":"tbobm","description":"Example repository used to demonstrate regular interval backups on a Unix pass git repository","archived":false,"fork":false,"pushed_at":"2022-01-02T22:56:59.000Z","size":29,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-24T22:29:29.894Z","etag":null,"topics":["aws","backups","cron","github-actions","pass","pass-unix","password","password-manager","s3","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tbobm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-12-31T21:55:16.000Z","updated_at":"2022-01-03T23:59:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"360a3544-14f1-4627-b61a-a98f58a3d4c2","html_url":"https://github.com/tbobm/pass-backup","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/tbobm/pass-backup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbobm%2Fpass-backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbobm%2Fpass-backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbobm%2Fpass-backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbobm%2Fpass-backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tbobm","download_url":"https://codeload.github.com/tbobm/pass-backup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbobm%2Fpass-backup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31848031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"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":["aws","backups","cron","github-actions","pass","pass-unix","password","password-manager","s3","terraform"],"created_at":"2024-11-11T07:59:29.850Z","updated_at":"2026-04-15T15:34:41.641Z","avatar_url":"https://github.com/tbobm.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pass Backup\n\n[![pass-backup:ci](https://github.com/tbobm/pass-backup/actions/workflows/terraform.yml/badge.svg)](https://github.com/tbobm/pass-backup/actions/workflows/terraform.yml) [![pass-backup:archive](https://github.com/tbobm/pass-backup/actions/workflows/backup.yml/badge.svg)](https://github.com/tbobm/pass-backup/actions/workflows/backup.yml)\n\nPerform regular backups of a pass git repository.\n\nSee: [_pass, the standard unix password manager_][pass-unix]\n\n[pass-unix]: https://www.passwordstore.org/\n\n_`pass` is a password management solution with GPG encryption and\na native git support_\n\n_note: I've been using this tool for a couple of years now, I highly\nrecommend giving it a try_\n\n## Goal\n\nThis repository aims to offer a simple backup mechanism of git repositories\nused to version control passwords managed using `pass`, the standard unix\npassword manager. ([site][pass-unix])\n\nThe [pass-backup:archive][archive] Workflow is used to schedule a Job\nthat will create a tarball archive of the `passwords` directory and\nupload it to AWS S3.\n\n[archive]: https://github.com/tbobm/pass-backup/actions/workflows/backup.yml\n\nIt leverages 2 services:\n- AWS S3: store the password archive tarball\n- Github Actions: generate the tarball and copy it to AWS S3\n\n## Features\n\n- Regular backups to an S3 bucket\n- GPG-encrypted passwords using `pass`\n- Easy to implement: terraform manifests are available in [`./terraform/`](./terraform/)\n\n### next steps\n\n- [ ] KMS encryption\n- [ ] Different S3 backends\n\n## Usage\n\n0. Credential management\n  a. Generate a Github Personal Access Token\n  b. Make sure you are authenticated against the AWS Terraform provider\n1. Adapt the configuration of the created Terraform resources\n2. Create the Infrastructure and configure the Github Secrets\n3. Add a `schedule` directive in the `./.github/workflows/backup.yml` Workflow\n\n### Credential management\n\n[gh-pat]: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token\n\nYou can create a PAT by following the documentation at\n[creating a personal access token][gh-pat].\n\nThen, export it in your environment by running:\n```console\n$ export GITHUB_TOKEN=ghp_xxxxxxxxxx\n```\n\n_See [Github Provider Authentication][gh-tf] for more information_\n\n[gh-tf]: https://registry.terraform.io/providers/integrations/github/latest/docs#authentication\n\nAs for the AWS Terraform provider, please refer to the corresponding\ndocumentation: [hashicorp/aws][aws-tf].\n\n[aws-tf]: https://registry.terraform.io/providers/hashicorp/aws/latest/docs#authentication\n\n### Adapt the resources\n\nYou **must** edit the following in the `./terraform/main.tf` file:\n- `module.bucket.bucket`: the name of the S3 Bucket (unique)\n- `module.backup_user.{namespace,stage,name}`: the identifier of the IAM User\n- `module.secrets.repository`: the name of your Github Repository\n\n### Create the Terraform resources\n\nThen, you can run the following commands in the `terraform` directory:\n```console $ terraform init\n$ terraform apply\n```\n\nThis will create:\n- The AWS S3 Bucket bootstrapped using the `terraform-aws-s3-bucket` module\n- An IAM User with API capabilities to authenticate the `pass-backup:archive` workflow\n- The Github Actions Secret to set the S3 bucket identifiers and API keys\n\n### Schedule the backups\n\nIn the `./.github/workflows/backup.yml` Workflow, add the following lines:\n```yaml\non:\n  workflow_dispatch:\n  # add the lines below\n  schedule:\n    - cron: '30 5,17 * * *'\n```\n\nSee [Schedule Trigger for Workflows][gh-schedule] for more information on the syntax\n\n[gh-schedule]: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#scheduled-events\n\n### Trying out the backup mechanism\n\nYou can confirm that your configuration is working as expected by\ntrigger the `pass-backup:archvie` Worfklow using `workflow_dispatch`.\n\nSee [Manual events - workflow_dispatch][gh-dispatch] for more informations.\n\n[gh-dispatch]: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#manual-events\n\n### Access your backups\n\nThe tarball archives are located in S3:\n```console\n$ aws s3 ls s3://tbobm-bucket-pass-backup/pass-backup/prod/archive/\n2022-01-02 23:10:57        162 2022-01-02.tar.gz\n```\n\nThe S3 Bucket key can be overriden in the `./terraform/main.tf` file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbobm%2Fpass-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftbobm%2Fpass-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbobm%2Fpass-backup/lists"}