diff --git a/README.md b/README.md index 834f063..7c1b916 100644 --- a/README.md +++ b/README.md @@ -416,4 +416,4 @@ shelvery_sqs_queue_wait_period=300 2. Run the `deploy-sam-template.sh` script with the options to deploy the template in the target account. - `-b` [required] source bucket to deploy the sam package to - - `-v` [optional] shelvery version to deploy, defaults to `0.8.4` + - `-v` [optional] shelvery version to deploy, defaults to `0.8.5` diff --git a/deploy-sam-template.sh b/deploy-sam-template.sh index 27012cd..ad844e0 100755 --- a/deploy-sam-template.sh +++ b/deploy-sam-template.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -SHELVERY_VERSION=0.8.4 +SHELVERY_VERSION=0.8.5 while getopts ":b:v:a:" opt; do case $opt in diff --git a/setup.py b/setup.py index b277084..4249f9c 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup -setup(name='shelvery', version='0.8.4', author='Base2Services R&D', +setup(name='shelvery', version='0.8.5', author='Base2Services R&D', author_email='itsupport@base2services.com', url='http://github.com/base2Services/shelvery-aws-backups', classifiers=[ diff --git a/shelvery/__init__.py b/shelvery/__init__.py index 84ce011..44dc06a 100644 --- a/shelvery/__init__.py +++ b/shelvery/__init__.py @@ -1,4 +1,4 @@ -__version__ = '0.8.4' +__version__ = '0.8.5' LAMBDA_WAIT_ITERATION = 'lambda_wait_iteration' S3_DATA_PREFIX = 'backups' SHELVERY_DO_BACKUP_TAGS = ['True', 'true', '1', 'TRUE'] diff --git a/shelvery/engine.py b/shelvery/engine.py index 69a2db6..2dfd80b 100644 --- a/shelvery/engine.py +++ b/shelvery/engine.py @@ -204,8 +204,17 @@ def create_backups(self) -> List[BackupResource]: }) except ClientError as e: if e.response['Error']['Code'] == 'InvalidDBInstanceState': - if RuntimeConfig.ignore_invalid_resource_state(): - self.logger.warn(f"{backup_resource.name} of type {resource_type} is not in a state a backup can be taken") + if RuntimeConfig.ignore_invalid_resource_state(self): + ignore_message = f"{resource_type} {backup_resource.entity_id} is not in a state a backup can be taken. Skipping backup {backup_resource.name}" + self.snspublisher.notify({ + 'Operation': 'CreateBackup', + 'Status': 'IGNORE', + 'Message': ignore_message, + 'BackupType': self.get_engine_type(), + 'BackupName': backup_resource.name, + 'EntityId': backup_resource.entity_id + }) + self.logger.warn(ignore_message) else: self.snspublisher_error.notify({ 'Operation': 'CreateBackup', diff --git a/template.yaml b/template.yaml index ead52c6..7cefc99 100644 --- a/template.yaml +++ b/template.yaml @@ -92,7 +92,7 @@ Resources: Tags: Name: Shelvery CreatedBy: Shelvery - ShelveryVersion: 0.8.4 + ShelveryVersion: 0.8.5 Environment: Variables: