Skip to content
This repository has been archived by the owner on Apr 18, 2018. It is now read-only.

Add volume name to the tag name of the snapshot #4

Open
nestoru opened this issue Jan 13, 2017 · 4 comments
Open

Add volume name to the tag name of the snapshot #4

nestoru opened this issue Jan 13, 2017 · 4 comments

Comments

@nestoru
Copy link

nestoru commented Jan 13, 2017

This would allow rapidly locating by name the necessary snapshots to be grabbed for BCP/DR purposes. I did something like that in my cross region script (https://github.com/nestoru/AWSCrossRegionReplicationLambda/blob/master/aws-cross-region-replication-lambda.py) and it has come handy when I want to test our DR.

                # Name target snapshots with the source volume name
                for target_snapshot in target_snapshots:
                    snapshot_resource = target_resource.Snapshot(target_snapshot['SnapshotId'])
                    snapshot_resource.create_tags(
                        Tags = [
                            {
                                'Key': 'Name',
                                'Value': volume_name
                            },
                        ]
                    )
@Fowler34
Copy link

Fowler34 commented Mar 3, 2017

Did you happen to add this to the Lambda function? If so, where at? I'd like to get Snapshot names as well :-)

@nestoru
Copy link
Author

nestoru commented Mar 7, 2017

@Fowler34 I did not add it to the ebs-snapshot-scheduler lambda function. I shared the code of what I am using today for cross region replication and I just hope that ebs-snapshot-scheduler does the same for the local backups.

@edbergavera
Copy link

@nestoru how often do you recommend this to be run? I'm thinking of running the script after the snapshots were taken.

@nestoru
Copy link
Author

nestoru commented Mar 19, 2017

@edbergavera not sure what you meant. This issue is about tagging the snapshot with the volume name.

Just speculating, I think your question is about https://github.com/nestoru/AWSCrossRegionReplicationLambda and if it is then you are asking about how often the local backups should be pushed to DR. I simply scheduled the cross region replication at the same interval I used for the snapshot scheduler (in my case every hour).

If you have more questions about cross region replication though I would recommend to ask in that github project. If you would like to add this feature into ebs-snapshot-scheduler I recommend you open a new issue here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants