{"id":16728812,"url":"https://github.com/sebdah/automated-ebs-snapshots","last_synced_at":"2025-03-17T01:31:40.246Z","repository":{"id":13477187,"uuid":"16167317","full_name":"sebdah/automated-ebs-snapshots","owner":"sebdah","description":"Script for managing automated AWS EBS snapshots","archived":false,"fork":false,"pushed_at":"2020-04-01T17:59:47.000Z","size":74,"stargazers_count":89,"open_issues_count":13,"forks_count":36,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-02-27T16:20:55.487Z","etag":null,"topics":["aws","aws-ebs","ebs","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/sebdah.png","metadata":{"files":{"readme":"README","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-01-23T08:55:22.000Z","updated_at":"2024-01-13T23:52:06.000Z","dependencies_parsed_at":"2022-09-10T15:50:13.423Z","dependency_job_id":null,"html_url":"https://github.com/sebdah/automated-ebs-snapshots","commit_stats":null,"previous_names":["skymill/automated-ebs-snapshots"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebdah%2Fautomated-ebs-snapshots","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebdah%2Fautomated-ebs-snapshots/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebdah%2Fautomated-ebs-snapshots/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebdah%2Fautomated-ebs-snapshots/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sebdah","download_url":"https://codeload.github.com/sebdah/automated-ebs-snapshots/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243836015,"owners_count":20355615,"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":["aws","aws-ebs","ebs","python"],"created_at":"2024-10-12T23:11:52.846Z","updated_at":"2025-03-17T01:31:39.749Z","avatar_url":"https://github.com/sebdah.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"automated-ebs-snapshots\n=======================\n.. image:: https://badge.fury.io/py/automated-ebs-snapshots.svg\n    :target: https://badge.fury.io/py/automated-ebs-snapshots\n.. image:: https://api.codeclimate.com/v1/badges/cbf2a51a48f04b2e0bec/maintainability\n   :target: https://codeclimate.com/github/skymill/automated-ebs-snapshots/maintainability\n   :alt: Maintainability\n\nAutomated EBS Snapshots helps you ensure that you have up to date snapshots of\nyour EBS volumes.\n\nAll you need to do to get started is documented below.\n\nInstallation\n------------\n::\n\n    pip install automated-ebs-snapshots\n\nAuthentication configuration\n----------------------------\n\nIAM Policy\n^^^^^^^^^^^^^^^^^^^^\n\nFirst you need to create an IAM user and give that user correct Permissions. Below is an example policy:\n::\n    {\n        \"Version\": \"2012-10-17\",\n        \"Statement\": [\n            {\n                \"Sid\": \"Stmt1453988686666\",\n                \"Effect\": \"Allow\",\n                \"Action\": [\n                    \"ec2:CreateSnapshot\",\n                    \"ec2:CreateTags\",\n                    \"ec2:DeleteTags\",\n                    \"ec2:DeleteSnapshot\",\n                    \"ec2:DescribeSnapshots\",\n                    \"ec2:DescribeVolumes\"\n                ],\n                \"Resource\": [\n                    \"*\"\n                ]\n            }\n        ]\n    }\n\n\nAutomated EBS snapshots can be configured either via command line options or using a configuration file.\n\n\nCommand line options\n^^^^^^^^^^^^^^^^^^^^\n\nYou can use the following command line options to authenticate to AWS.\n::\n\n    AWS configuration options:\n      --access-key-id ACCESS_KEY_ID\n                            AWS access key\n      --secret-access-key SECRET_ACCESS_KEY\n                            AWS secret access key\n      --region REGION       AWS region\n\nConfiguration file\n^^^^^^^^^^^^^^^^^^\n\nCreate a configuration file anywhere on you file system. If parameters for access-key-id and `secret-access-key` are not defined, the instance's IAM role will be used instead.\n::\n\n    [general]\n    access-key-id: xxxx\n    secret-access-key: xxxxxxxx\n    region: eu-west-1\n\nThen use the ``--config`` command line option to point at your configuration file.\n\nWatching and unwatching volumes\n-------------------------------\n\nStart watching a volume\n^^^^^^^^^^^^^^^^^^^^^^^\n\nIn order to enable automatic snapshots, you need to start watching the volume.\nThe following command will add ``vol-13245678`` to the watchlist with snapshots\ncreated daily.\n::\n\n    automated-ebs-snapshots --config ~/auto-ebs-snapshots.conf --watch vol-12345678 --interval daily\n\nAdd volumes to watch list\n^^^^^^^^^^^^^^^^^^^^^^^^^\n\nTo add lots of volumes in one time, we can create a configuration file to define volumes(support volume id or Name tag), interval and retention.\n::\n\n  vol-d9d6d6af,weekly,2\n  volume1,weekly,4\n  volume2,daily,0\n\nThen run the following command\n::\n\n    automated-ebs-snapshots --config ~/auto-ebs-snapshots.conf --watch-file volumes.conf\n\nList watched volumes\n^^^^^^^^^^^^^^^^^^^^\n\nList the currently watched volumes and their backup interval\n::\n\n    automated-ebs-snapshots --config ~/automated-ebs-snapshots.conf --list\n\nStop watching a volume\n^^^^^^^^^^^^^^^^^^^^^^\n\nTo stop creating automated backups for a volume, run this:\n::\n\n    automated-ebs-snapshots --config ~/automated-ebs-snapshots.conf --unwatch vol-12345678\n\nRemove volumes from watch list\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nTo remove all volumes in the configuration file, just run:\n::\n\n    automated-ebs-snapshots --config ~/auto-ebs-snapshots.conf --unwatch-file volumes.conf\n\nList snapshots for a volume\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nList all snapshots for the given volume id or volume name\n::\n\n    automated-ebs-snapshots --config ~/automated-ebs-snapshots.conf --snapshots vol-d9d6d6af\n\nCreating snapshots\n------------------\n\nNow, to start taking snapshots you will need to have Automated EBS Snapshots running. You can either run ``automated-ebs-snapshots`` manually (i.e. scheduled in crontab or such) or have it running in daemon mode.\n\nManual execution\n^^^^^^^^^^^^^^^^\nRunning ``automated-ebs-snapshots`` manually:\n::\n\n    automated-ebs-snapshots --config ~/automated-ebs-snapshots.conf --run\n\nIt will check if there are any volumes with no or too old snapshots. New\nsnapshots will be created if needed.\n\nForce run\n^^^^^^^^^\nIt's possible to force run the command by using the ``--force-run`` parameter:\n::\n\n    automated-ebs-snapshots --config ~/automated-ebs-snapshots.conf --force-run\n\nDaemon mode\n^^^^^^^^^^^\nStart the daemon by running\n::\n\n  automated-ebs-snapshots --config ~/automated-ebs-snapshots.conf --daemon start\n\nStop the daemon with\n::\n\n  automated-ebs-snapshots --config ~/automated-ebs-snapshots.conf --daemon stop\n\nYou can also restart it using\n::\n\n  automated-ebs-snapshots --config ~/automated-ebs-snapshots.conf --daemon restart\n\nRelease notes\n-------------\n\n0.6.1\n^^^^^\n\n- [bugfix] Fix command line argument ``--force-run`` (`#40 \u003chttps://github.com/skymill/automated-ebs-snapshots/pull/40\u003e`__). Fixes `#39 \u003chttps://github.com/skymill/automated-ebs-snapshots/pull/39\u003e`__\n\n0.6.0\n^^^^^\n\n- [feature] Introducing ``--force-run`` flag (`#27 \u003chttps://github.com/skymill/automated-ebs-snapshots/pull/27\u003e`__). Fixes `#23 \u003chttps://github.com/skymill/automated-ebs-snapshots/pull/23\u003e`__\n- [bugfix] Fix for timestamp format change (`#37 \u003chttps://github.com/skymill/automated-ebs-snapshots/pull/37\u003e`__). Fixes `#36 \u003chttps://github.com/skymill/automated-ebs-snapshots/pull/36\u003e`__\n\n0.5.0\n^^^^^\n\n- Add better long EBS ID's (`#33 \u003chttps://github.com/skymill/automated-ebs-snapshots/pull/33\u003e`__)\n\n0.4.1\n^^^^^\n\n- Fix for logging incorrect region information when using instance role (`#19 \u003chttps://github.com/skymill/automated-ebs-snapshots/pull/19\u003e`__). Thanks `@robaman \u003chttps://github.com/robaman\u003e`__ for the pull request\n\n0.4.0\n^^^^^\n\n- Added support for reading volumes from file (`#13 \u003chttps://github.com/skymill/automated-ebs-snapshots/issues/13\u003e`__). Thanks `@yumminhuang \u003chttps://github.com/yumminhuang\u003e`__ for the pull request\n- Now supports managing volumes by tag `Name` in addition to `volume-id` (`#13 \u003chttps://github.com/skymill/automated-ebs-snapshots/issues/13\u003e`__). Thanks `@yumminhuang \u003chttps://github.com/yumminhuang\u003e`__ for the pull request\n\n0.3.2\n^^^^^\n\n- Bumped requirement to boto \u003e= 2.29.0 (`#7 \u003chttps://github.com/skymill/automated-ebs-snapshots/issues/7\u003e`__)\n\n0.3.1\n^^^^^\n\n- Fixed IAM Instance Profile authentication for boto \u003e= 2.29.0 (`#6 \u003chttps://github.com/skymill/automated-ebs-snapshots/issues/6\u003e`__)\n\n0.3.0\n^^^^^\n\n- Print volume Name tag in --list (`#3 \u003chttps://github.com/skymill/automated-ebs-snapshots/issues/3\u003e`__)\n- Support authentication using instance profiles (`#5 \u003chttps://github.com/skymill/automated-ebs-snapshots/issues/5\u003e`__)\n- Only write logs to file if --log-file is specified (`#2 \u003chttps://github.com/skymill/automated-ebs-snapshots/issues/2\u003e`__)\n\nAuthor\n------\n\nThis project is maintained by `Sebastian Dahlgren \u003chttp://www.sebastiandahlgren.se\u003e`__ and it is supported by `Skymill Solutions \u003chttp://www.skymillsolutions.com\u003e`__.\n\nLicense\n-------\n\nAPACHE LICENSE 2.0\nCopyright 2014 Skymill Solutions\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   `http://www.apache.org/licenses/LICENSE-2.0 \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e`__\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebdah%2Fautomated-ebs-snapshots","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsebdah%2Fautomated-ebs-snapshots","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebdah%2Fautomated-ebs-snapshots/lists"}