Code Monkey home page Code Monkey logo

ebs-snapman's Introduction

ebs-snapman

Snapshot management and rotation for AWS EBS volumes.

Installation

Install the requirements:

pip install -r requirements.txt

Usage

Adjust config.py as required. Note that snapshots will only be performed on volumes which have the specified tag, by default this is "MakeSnapshot: True".

Review the order in which credentials will be selected and provide them accordingly: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html

Create a daily cron job to run snapshots. For example, at 3am each day:

0 3 * * * root python3 /root/scripts/ebs-snapman/ebs-snapman.py

And an optional cron job for the summary. For example, a weekly summary:

15 3 * * 1 root python3 /root/scripts/ebs-snapman/ebs-snapman.py --summmary

Be sure to have your cron environemt configured to send emails.

Example summary:

SERVER01_ROOT_VOL
vol-1b7dab28
====================
Managed snapshots:
------------------
03-02-2023-day: Fri_server01_root_vol_03-02-2023
02-02-2023-day: Thu_server01_root_vol_02-02-2023
01-02-2023-day: Feb_server01_root_vol_01-02-2023
31-01-2023-day: Tue_server01_root_vol_31-01-2023
30-01-2023-day: Mon_server01_root_vol_30-01-2023
29-01-2023-day: Week-05_server01_root_vol_29-01-2023
28-01-2023-day: Sat_server01_root_vol_28-01-2023
29-01-2023-week: Week-05_server01_root_vol_29-01-2023
22-01-2023-week: Week-04_server01_root_vol_22-01-2023
15-01-2023-week: Week-03_server01_root_vol_15-01-2023
08-01-2023-week: Week-02_server01_root_vol_08-01-2023
01-01-2023-week: Jan_server01_root_vol_01-01-2023
01-02-2023-month: Feb_server01_root_vol_01-02-2023
01-01-2023-month: Jan_server01_root_vol_01-01-2023
01-12-2022-month: Dec_server01_root_vol_01-12-2022
01-11-2022-month: Nov_server01_root_vol_01-11-2022
01-10-2022-month: Oct_server01_root_vol_01-10-2022

Erroneous managed snapshots:
----------------
Jun_server01_root_vol_01-06-2022

Other snapshots:
----------------
None

ebs-snapman's People

Contributors

lupinelab avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.