sopel / botocross

A Python package for operating cross region AWS resources
Other
4 stars 4 forks source link

Provide an option to exclude a resource from backup. #24

Closed sopel closed 11 years ago

sopel commented 11 years ago

The tagging based filtering of create-images.py and create-snapshots.py allows for easy backup handling across all regions.

The facilitated AWS filters provide inclusion selectors only though, which renders common scenarios like 'all those except these resources' more complicated than necessary.

While this can usually be worked around via more granular combination of filters, this obviously defeats the tagging based automatic backup inclusion and a remedy is desired.accordingly.

There seem to be two options:

  1. Provide exclusion filters on top of AWS and process these client side before submitting the result to AWS (i.e. a set operation: get included resources and subtract excluded resources).
  2. Orchestrate this via tags as well, which is envisioned for various other scenarios already (i.e. a tag based mini DSL to parameterize the backup, which could offer opting out of backup as well).

Clearly 1) seems to allow for more flexibility, while 2) seems to fit better to the desired tag orchestrated and respectively self contained resource management.

mrdavidlaing commented 11 years ago

Aren't (1) and (2) basically the same thing?

create-images.py --filter tag:Name=* --exclusion-filter tag:doNotBackup=true

An implementation of (1) with a "user created" tag mini DSL (2)

sopel commented 11 years ago

No, I've considered and sketched (and partially prepared) the mini DSL to be specified within the tag value rather than its name, i.e. the already facilitated tag 'Backup Policy' could have values like e.g. "set=;keep=;at=;options=

Like so you wouldn't need to configure the backup externally at all, rather every resource would carry its own backup policy, providing the utmost flexibility for automation/provisioning; also the automation engine could be exchanged, insofar it would only need to scan for added/removed/adjusted resources and could schedule respective operations autonomously..

sopel commented 11 years ago

@mrdavidlaing - regardless of my previous comment, I'm going to implement 1) first, because this solution is simpler and generally applicable to all scripts using resource filters immediately, i.e. not just the ones in question (those used for backup).

mrdavidlaing commented 11 years ago

+1 from me for implementing (1) first

sopel commented 11 years ago

@mrdavidlaing - #31 implements (1) in a generic fashion now, i.e. it applies to all resources/scripts.