So, I'm trying to automate our backups of the GAE data warehouse using cron.yaml. In addition, I would like to use Google Cloud Storage as the destination for our backups. I created a bucket and configured the ACL. Manual backups work from the data warehouse administrator console. I can even get cron to work. But we are pushing the same code base to three different environments: dev, staging, production. Therefore, I would like to split the backups in different codes based on the name of the application.
I would like intermediate storage to move to myapp_staging_bk bucket, dev to myapp_dev_bk bucket and exit to myapp_live_bk.
cron.yaml:
cron:
- description: My Daily Backup
url: /_ah/datastore_admin/backup.create?name=BackupToCloud&kind=LogTitle&kind=EventLog&filesystem=gs&gs_bucket_name=whitsend
schedule: every 12 hours
target: ah-builtin-python-bundle
All of this would be very simple if I could find a way to pull out the application name in the above URL. Something like that:
url: /_ah/datastore_admin/backup.create?name=BackupToCloud&kind=LogTitle&kind=EventLog&filesystem=gs&{myapp}_bk=whitsend
schedule: every 12 hours
where {myapp} will be the name of the application that is in app.yaml.
https://developers.google.com/appengine/articles/scheduled_backups does not say anything about this type of installation.
I know that I could remove this from our CI server, but I would like to avoid this.
Does anyone have any suggestions?
source
share