{"id":16294684,"url":"https://github.com/valve/fallout","last_synced_at":"2025-03-20T04:30:40.982Z","repository":{"id":20641421,"uuid":"23923321","full_name":"Valve/fallout","owner":"Valve","description":"Really easy Amazon EC2 backup/restore solution.","archived":false,"fork":false,"pushed_at":"2016-03-23T18:46:48.000Z","size":14,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-15T02:08:30.892Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/Valve.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-11T15:09:57.000Z","updated_at":"2019-11-25T04:52:29.000Z","dependencies_parsed_at":"2022-08-29T21:00:36.149Z","dependency_job_id":null,"html_url":"https://github.com/Valve/fallout","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valve%2Ffallout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valve%2Ffallout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valve%2Ffallout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valve%2Ffallout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Valve","download_url":"https://codeload.github.com/Valve/fallout/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244551974,"owners_count":20470965,"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":[],"created_at":"2024-10-10T20:16:07.680Z","updated_at":"2025-03-20T04:30:40.680Z","avatar_url":"https://github.com/Valve.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![codebeat badge](https://codebeat.co/badges/6908ee87-bb8a-4af2-aab5-816f5f08bdf7)](https://codebeat.co/projects/github-com-valve-fallout)\n\n# Fallout\n\nReally easy Amazon EC2 backup/restore solution.\nWorks by making volume snapshots periodically (with expiration)\nand taking the last snapshot when restoring.\n\nFallout is really easy, I suggest you try it.\n\n## Installation\n\n    $ gem install fallout\n\n## Usage\n\nThis gem installs `fallout` executable. Don't forget to run `rbenv` rehash, if you're on rbenv.\n\n### Required environment variables:\n\n`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` and `AWS_REGION`\n\n`AWS_REGION` is required to be able to connect with AWS SDK. Specify the region of the EC2 instance you want to back up/restore.\n\n#### Optional environment variables - used in restore command only:\n\n`AWS_AVAILABILITY_ZONE` - availability zone where to create the new volume for your instance in.\n\nIf you don't set it, it will default to your AWS_REGION + 'a', e.g. `eu-central-1a`.\n\n`AWS_ATTACH_VOLUME_AS_DEVICE` - will use `/dev/sda1` as default.\n\nFallout supports 2 commands:\n\n### backup\n\nSyntax:\n\n`fallout backup -v \u003cvolume_id\u003e -k \u003ckeep_days\u003e`\n\nExample:\n\n```\n$ fallout backup -v vol-23ab3d -k 7\n\n Deleted snapshots snap-6695b3a5, snap-ca6a3069\n Created new snapshot snap-b67f7725, expires after 2014-09-14\n```\n\n_This will create a snapshot for the specified volume and will mark it\nas valid for 7 days. It will also delete all expired snapshots, created for the\nspecified volume._\n\n#### How does expiration work?\n\nWhen creating a snapshot, `fallout` will tag it with a special\n`expires_on` tag. When running the backup, `fallout` will search for\nany expired snapshots and remove them. This way you can have `fallout`\nrunning every day, it will keep N most fresh snapshots automatically.\n\n### restore\n\nRestoring is a one-liner too.\n\nSyntax:\n\n`fallout restore -i \u003cinstance_id\u003e -v \u003cvolume_id\u003e`\n\nExample:\n\n```\n$ fallout restore -i i-f7850bda -v vol-72436837\n\nShutting down your instance.\nShut down instance successfully: i-f7850bda, status: stopped\nDetached volume vol-72436837 from instance i-f7850bda successfully\nCreated new volume from the latest snapshot (vol-3942697c)\nAttached new volume to instance\nSuccessfully restored and started the instance with the new volume\nInstance public hostname: ec2-54-165-20-157.compute-1.amazonaws.com\nYou may want to delete the old, detached volume vol-72436837 and old volume snapshots\nIMPORTANT: You must update your backup command to use new volume_id: vol-3942697c\n```\n\n#### How does restoring work?\n\nRestoring with fallout requires you to have at least 1 snapshot for the\nvolume. The process will shutdown the instance, detach the root volume,\ncreate new volume from the latest snapshot and attach it as `/dev/sda1`\ndevice(can be overridden with AWS_ATTACH_VOLUME_AS_DEVICE env var).\nThen the process will boot the instance with the new volume and\ndisplay its public hostname.\n\n#### General considerations:\n\nI created this gem purely for my own purposes, we only have a handful of\nEC2 instances and the gem is working fine for us.\n\nI run `fallout backup` daily with cron.\n\nContributions, tips/advices and pull requests are welcome.\n\n### License\n\nThis code is MIT licensed:\n\nCopyright (c) 2015 Valentin Vasilyev\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n## Contributing\n\n1. Fork it ( http://github.com/\u003cmy-github-username\u003e/fallout/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalve%2Ffallout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalve%2Ffallout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalve%2Ffallout/lists"}