cmachler/aws-lambda-ebs-backups

Allow Filtering of EBS Volumes from Snapshot Job

ramdevops1 opened this issue · 5 comments

Hello cmachler..!

if we do c drive backup it will not take backup everything while system running. if we deploy every app on D drive. (i.e. device_name = "xvdb"). we want to take only specific drive not all attached drive.

How can we filter volumes in your script and backup only those devices.?

Hope you understand the need.

That would have to be an enhancement to the script to exclude specific EBS volumes from snapshots by the job. I will take a look at this when I can, or I open this up to anyone in the community to work on this feature.

But yes I do see the need for filtering volumes.

Hello cmachler,

I have used "lambda-ebs-backup.py" script in lambda function using all the steps you have provided however, when I run a "Test" the lambda function it get "Execution result: succeeded" but it doesn't find any instance in region. The message in logs shows "Found 0 instances that need backing up in region us-east-1". I have 80 instances running in us-east-1 region. And I have set Lambda environment variable "aws_regions" = "dXMtZWFzdC0x" (without " ").

I have attached the script which I have used.
lambda-ebs-backup.docx

Please suggest what could be the issue here.

Please elaborate process of "Add the SNS Topics ARN you want publish as a Lambda environmenet variable "aws_sns_arn""

@mkatkade please double check your IAM permissions with regards to no instances being found. As for SNS ARN please see the following AWS documentation (http://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html) for more information.

FYI next time please open a new issue instead of commenting on an existing issue that is a different topic.

@ramdevops1 I just added this functionality, to skip volumes perform the following:

  1. Add the tag key to the instance Skip_Backup_Volumes
  2. To the above key add the value with the single volume-id or multiple volume-id's in a CSV string.

Let me know if you have any questions.