Add label-based exemptions
Occasionally we don't want to back up production databases. The poster child example for this is the Raven Core IdP database where both the IdP and shib-side database state is a cache rather than something we need to persist.
Add an --instance-filter
option which defaults to None
which provides a string suitable for passing to the list method used to query SQL instances.
This can be be used to implement label-based exemption using, e.g.,
$ gcp-sql-backup --instance-filter "NOT settings.userLabels.skip_backup:true" [... remaining args]