Skip to content
This repository was archived by the owner on Jan 22, 2023. It is now read-only.

Commit 8a0c862

Browse files
committed
Script comment cleanup
1 parent a8266c0 commit 8a0c862

File tree

1 file changed

+4
-68
lines changed

1 file changed

+4
-68
lines changed

ebs-snapshot.sh

Lines changed: 4 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ export PATH=$PATH:/usr/local/bin/:/usr/bin
66
set -ue
77
set -o pipefail
88

9-
109
## Automatic EBS Volume Snapshot Creation & Clean-Up Script
1110
#
1211
# Written by Casey Labs Inc. (https://www.caseylabs.com)
13-
# Casey Labs - Contact us for all your Amazon Web Services Consulting needs!
12+
# Contact us for all your Amazon Web Services Consulting needs!
13+
# Script Github repo: https://github.com/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash
1414
#
1515
# Additonal credits: Log function by Alan Franzoni; Pre-req check by Colin Johnson
1616
#
@@ -20,75 +20,11 @@ set -o pipefail
2020
# - Take a snapshot of each attached volume
2121
# - The script will then delete all associated snapshots taken by the script that are older than 7 days
2222
#
23-
# DISCLAIMER: Hey, this script deletes snapshots (though only the ones that it creates)!
24-
# Make sure that you undestand how the script works. No responsibility accepted in event of accidental data loss.
23+
# DISCLAIMER: This script deletes snapshots (though only the ones that it creates).
24+
# Make sure that you understand how the script works. No responsibility accepted in event of accidental data loss.
2525
#
2626

2727

28-
## Requirements ##
29-
30-
## 1) IAM USER:
31-
#
32-
# This script requires that a new IAM user be created in the IAM section of AWS.
33-
# Here is a sample IAM policy for AWS permissions that this new user will require:
34-
#
35-
# {
36-
# "Version": "2012-10-17",
37-
# "Statement": [
38-
# {
39-
# "Sid": "Stmt1426256275000",
40-
# "Effect": "Allow",
41-
# "Action": [
42-
# "ec2:CreateSnapshot",
43-
# "ec2:CreateTags",
44-
# "ec2:DeleteSnapshot",
45-
# "ec2:DescribeSnapshotAttribute",
46-
# "ec2:DescribeSnapshots",
47-
# "ec2:DescribeVolumeAttribute",
48-
# "ec2:DescribeVolumes"
49-
# ],
50-
# "Resource": [
51-
# "*"
52-
# ]
53-
# }
54-
# ]
55-
# }
56-
57-
58-
## 2) AWS CLI:
59-
#
60-
# This script requires the AWS CLI tools to be installed.
61-
# Read more about AWS CLI at: https://aws.amazon.com/cli/
62-
#
63-
# Linux install instructions for AWS CLI:
64-
# ASSUMPTION: these commands are ran as the ROOT user.
65-
#
66-
# - Install Python pip (e.g. yum install python-pip or apt-get install python-pip)
67-
# - Then run: pip install awscli
68-
#
69-
# Configure AWS CLI by running this command:
70-
# aws configure
71-
#
72-
# [NOTE: if you have an IAM Role Setup for your instance to use the IAM policy listed above, you can skip the aws configure step.]
73-
#
74-
# Access Key & Secret Access Key: enter in the credentials generated above for the new IAM user
75-
# Region Name: the region that this instance is currently in (e.g. us-east-1, us-west-1, etc)
76-
# Output Format: enter "text"
77-
78-
79-
## 3) SCRIPT INSTALLATION:
80-
#
81-
# Copy this script to /opt/aws/ebs-snapshot.sh
82-
# And make it exectuable: chmod +x /opt/aws/ebs-snapshot.sh
83-
#
84-
# Then setup a crontab job for nightly backups:
85-
# (You will have to specify the location of the AWS CLI Config file)
86-
#
87-
# AWS_CONFIG_FILE="/root/.aws/config"
88-
# 00 06 * * * root /opt/aws/ebs-snapshot.sh
89-
90-
91-
9228
## Variable Declartions ##
9329

9430
# Get Instance Details

0 commit comments

Comments
 (0)