{"id":42702233,"url":"https://github.com/stenic/go-rotate-backups","last_synced_at":"2026-01-29T14:22:23.825Z","repository":{"id":65195430,"uuid":"434038376","full_name":"stenic/go-rotate-backups","owner":"stenic","description":"Backup any type of file as daily/weekly/monthly/yearly versions.","archived":false,"fork":false,"pushed_at":"2023-12-08T20:09:09.000Z","size":130,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-06-20T00:38:31.921Z","etag":null,"topics":["backup","daily","monthly","rotate","weekly","yearly"],"latest_commit_sha":null,"homepage":"","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/stenic.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":"2021-12-02T01:09:24.000Z","updated_at":"2023-02-14T10:17:07.000Z","dependencies_parsed_at":"2024-06-20T00:20:54.386Z","dependency_job_id":"68b405b4-a87d-42f6-b70e-19c99c508da0","html_url":"https://github.com/stenic/go-rotate-backups","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/stenic/go-rotate-backups","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stenic%2Fgo-rotate-backups","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stenic%2Fgo-rotate-backups/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stenic%2Fgo-rotate-backups/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stenic%2Fgo-rotate-backups/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stenic","download_url":"https://codeload.github.com/stenic/go-rotate-backups/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stenic%2Fgo-rotate-backups/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28879381,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T10:31:27.438Z","status":"ssl_error","status_checked_at":"2026-01-29T10:31:01.017Z","response_time":59,"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","daily","monthly","rotate","weekly","yearly"],"created_at":"2026-01-29T14:22:22.873Z","updated_at":"2026-01-29T14:22:23.816Z","avatar_url":"https://github.com/stenic.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-rotate-backups\n\n\u003e Still a WIP\n\ngo-rotate-backups backups up files to a target and rotates them. It currently only has support for `local` and `s3`.\n\n```shell\n$ tree -L 1 backups \nbackups\n├── daily\n├── monthly\n├── weekly\n└── yearly\n```\n\n## Installation\n\n```shell\n# homebrew\nbrew install stenic/tap/go-rotate-backups\n\n# gofish\ngofish rig add https://github.com/stenic/fish-food\ngofish install github.com/stenic/fish-food/go-rotate-backups\n\n# scoop\nscoop bucket add go-rotate-backups https://github.com/stenic/scoop-bucket.git\nscoop install go-rotate-backups\n\n# go\ngo install github.com/stenic/go-rotate-backups@latest\n\n# docker \ndocker pull ghcr.io/stenic/go-rotate-backups:latest\n\n# dockerfile\nCOPY --from=ghcr.io/stenic/go-rotate-backups:latest /go-rotate-backups /usr/local/bin/\n```\n\n\u003e For even more options, check the [releases page](https://github.com/stenic/go-rotate-backups/releases).\n\n\n## Run\n\n```shell\n# Installed\ngo-rotate-backups -h\n\n# Docker\ndocker run -ti ghcr.io/stenic/go-rotate-backups:latest -h\n\n# Kubernetes\nkubectl run go-rotate-backups --image=ghcr.io/stenic/go-rotate-backups:latest --restart=Never -ti --rm -- -h\n```\n\n## Documentation\n\n```shell\ngo-rotate-backups -h\n\nUsage:\n  go-rotate-backups [flags] files...\n\nFlags:\n      --daily int          Amount of daily backups to keep (default 7)\n      --driver string      Driver selection (file, s3) (default \"file\")\n  -h, --help               help for go-rotate-backups\n      --monthly int        Amount of monthly backups to keep (default 12)\n      --target string      Base location where backup live (default \"./backups\")\n  -v, --verbosity string   Log level (debug, info, warn, error, fatal, panic (default \"info\")\n      --version            version for go-rotate-backups\n      --weekly int         Amount of weekly backups to keep (default 4)\n      --yearly int         Amount of yearly backups to keep (default 5)\n```\n\n### How does it work\n\nWhen running the command, the provided files will be copied to the backup location. After the copy is\ncompleted, it will check the rotation configuration to cleanup unneeded backups.\n\n__Backup__\n\nDepending on the current date, it will upload to different folders:\n\n\n| Date | Target |\n| --- | --- |\n| first day of the year | yearly/${date}_${time} |\n| first day of the month | monthly/${date}_${time} |\n| first day of the week | weekly/${date}_${time} |\n| other | daily/${date}_${time} |\n\n__Rotate__\n\nRotate will keep the `n` most recent files in the backup folder and clear out the others.\n\nSee `yearly`, `monthly`, `weekly` and `daily` for setting the different rotation settings.\n\n\n### Drivers\n\n__local__\n\nThe local driver uses a local folder to store it's data. It does not require any special configuration.\n\n\n__s3__\n\nThe s3 driver uses [Amazon S3](https://aws.amazon.com/s3/) to store it's data. To configure the s3\ncredentials you will need to set the following environment variables:\n\n| Name | Description |\n| --- | --- |\n| `GRB_S3_BUCKET` | The bucket name |\n| `AWS_*`  | AWS credentials to use. This can be either `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` or `AWS_PROFILE` if you want to use the shared credential file |\n\n\n## Badges\n\n[![Release](https://img.shields.io/github/release/stenic/go-rotate-backups.svg?style=for-the-badge)](https://github.com/stenic/go-rotate-backups/releases/latest)\n[![Software License](https://img.shields.io/github/license/stenic/go-rotate-backups?style=for-the-badge)](./LICENSE)\n[![Build status](https://img.shields.io/github/workflow/status/stenic/go-rotate-backups/Release?style=for-the-badge)](https://github.com/stenic/go-rotate-backups/actions?workflow=build)\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=for-the-badge)](https://conventionalcommits.org)\n\n## License\n\n[License](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstenic%2Fgo-rotate-backups","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstenic%2Fgo-rotate-backups","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstenic%2Fgo-rotate-backups/lists"}