Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance snapshot replicator #39

Merged
merged 3 commits into from
Oct 11, 2019
Merged

enhance snapshot replicator #39

merged 3 commits into from
Oct 11, 2019

Conversation

minniux
Copy link
Contributor

@minniux minniux commented Oct 9, 2019

  • switch db event subscribing to snapshots so we can use snapshot data to copy only the recently created snapshot
  • make sure cleanup lambda doesn't attempt removing automated snapshot as it raises an error
  • make custom snapshot taking rate fully customizable

related issue: https://github.com/skyscrapers/q1_6/issues/134

print response
except botocore.exceptions.ClientError as e:
raise Exception("Could not issue delete command: %s" % e)
if snapshot['SnapshotType'] == 'manual':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe you can filter out automatic snapshots in the describe_db_snapshots api call?

raise Exception("Could not issue copy command: %s" % e)
copied_snaps = target.describe_db_snapshots(SnapshotType='manual', DBInstanceIdentifier=instance)['DBSnapshots']

if instance in snapshot_detailts['DBInstanceIdentifier']:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can replace this if and the for above by doing this:

if snapshot_detailts['DBInstanceIdentifier'] in instances.split(','):

@minniux minniux merged commit 34ee370 into master Oct 11, 2019
@minniux minniux deleted the enhanceSnapshotReplicator branch October 11, 2019 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants