{"id":23123120,"url":"https://github.com/devgeniem/flynn-s3-backup","last_synced_at":"2026-05-11T05:43:07.515Z","repository":{"id":152981012,"uuid":"82316762","full_name":"devgeniem/flynn-s3-backup","owner":"devgeniem","description":"Docker image for Flynn cluster backup into AWS S3 which you can run as Flynn app","archived":false,"fork":false,"pushed_at":"2019-09-30T11:25:21.000Z","size":16,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-30T15:02:55.881Z","etag":null,"topics":["backup","bash","docker","flynn","s3"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/devgeniem.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}},"created_at":"2017-02-17T16:36:12.000Z","updated_at":"2019-09-30T11:25:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"f00ac2dc-d965-487b-b318-59d9a05ac23e","html_url":"https://github.com/devgeniem/flynn-s3-backup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devgeniem%2Fflynn-s3-backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devgeniem%2Fflynn-s3-backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devgeniem%2Fflynn-s3-backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devgeniem%2Fflynn-s3-backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devgeniem","download_url":"https://codeload.github.com/devgeniem/flynn-s3-backup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247119275,"owners_count":20886721,"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","bash","docker","flynn","s3"],"created_at":"2024-12-17T07:32:44.432Z","updated_at":"2026-05-11T05:43:07.476Z","avatar_url":"https://github.com/devgeniem.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hacky Flynn s3 backup script\n\nThis is a docker image which uses minio client to connect into s3 bucket in amazon.\n\nIt downloads [Flynn](https://flynn.io) cluster backup tar file from http api and transfers it into append-only versioned s3.\n\nBackups will first get uploaded into highly available `STANDARD` zone in s3.\n\nThey are transitioned to `STANDARD_IA` after 60 days.\n\nAnd then transitioned to `GLACIER` after 120 days.\n\nYou can decide when AWS expires old backups from `GLACIER`.\n\n**Note:**This script will exit when the backup is ready and it counts in the Flynn's ability to spin up new process for the next backup.\n\n## Usage\n\n### Create and deploy the backup process as app in Flynn\n```bash\n$ docker build -t devgeniem/flynn-backup .\n$ flynn create s3-backup --remote=\"\" \n$ flynn -a s3-backup docker push devgeniem/flynn-backup\n```\n\n### Create append only s3 bucket and aws iam user\n**Note:** Check that [terraform cli](https://www.terraform.io/) has been installed before this.\n\n```bash\n$ cd terraform\n\n# This creates new bucket and aws iam user credentials for the account that you provide\n$ terraform apply\n```\n\n### Configure the backup process\n```bash\n# Get the flynn controller AUTH_KEY which you can use as FLYNN_AUTH_KEY later\n$ flynn -a controller env get AUTH_KEY\n\n# Setup the backup process\n$ flynn -a s3-backup env set \\\n\tFLYNN_AUTH_KEY=auth-key-from-flynn \\\n\tAWS_S3_BUCKET=your-bucket-name \\\n\tAWS_ACCESS_KEY_ID=YYYYYYYYYYYYYYYY \\\n\tAWS_SECRET_ACCESS_KEY=XXXXXXXXXXXXXX \\\n\tBACKUP_INTERVAL_SECONDS=10800 # Put any interval \u003e1800 here\n```\n\n### Start the backup process\n```\n$ flynn -a s3-backup scale app=1\n```\n\n## How to retrieve old backups from versioned bucket\n**Note:** Check that [aws commandline tools](http://docs.aws.amazon.com/cli/latest/userguide/installing.html) has been installed before this.\n\n```bash\n# This outputs json of all versions\n$ aws s3api list-object-versions --bucket your-bucket-name\n\n# This is how you restore older version\n# In this example the version we want to restore is rehtEuCbtlaaJWnP0jfdHMQLkyrBPHG_\n$ aws s3api get-object --bucket your-bucket-name \\\n\t--key backups/flynn-backup.tar \\\n\t--version-id rehtEuCbtlaaJWnP0jfdHMQLkyrBPHG_ \\\n\tflynn-backup.tar\n```\n\n## Maintainers\n[@onnimonni](https://github.com/onnimonni)\n\n## License\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevgeniem%2Fflynn-s3-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevgeniem%2Fflynn-s3-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevgeniem%2Fflynn-s3-backup/lists"}