0
votes

I'm trying to use the Datastore Admin backup function to save data in case something happens. When I navigate to the AppEngine link and utilize the web browser, the backup succeeds with the following information:

Overview

  • Success
  • Elapsed time: 00:00:03
  • Start time: 7/21/2014 8:36:53 PM
  • entity_kind: "AppVersion"
  • filesystem: "gs"
  • gs_bucket_name: "zz_backups"
  • namespace: null

Counters

  • io-write-bytes: 32768 (10922.67/sec avg.)
  • io-write-msec: 20 (6.67/sec avg.)
  • mapper-calls: 4 (1.33/sec avg.)
  • mapper-walltime-ms: 163 (54.33/sec avg.)

And it properly backs up 'AppVersion' entities to the zz_backup bucket. However, when I try to upload a cron job with the following details using the information here

 <cron>
        <url>/_ah/datastore_admin/backup.create?name=DataBackup&amp;kind=AppVersion&amp;filesystem=gs&amp;gs_bucket_name=zz_backups</url>
        <description>Backs up app data every day</description>
        <schedule>every 24 hours</schedule>
        <target>beta83</target>
    </cron>

It fails. The log files don't say anything useful:

8ms /_ah/datastore_admin/backup.create?name=DataBackup&kind=AppVersion&filesystem=gs&gs_bucket_name=zz_backups

0.1.0.1 - - [21/Jul/2014:17:36:11 -0700] "GET /_ah/datastore_admin/backup.create?name=DataBackup&kind=AppVersion&filesystem=gs&gs_bucket_name=zz_backups HTTP/1.1" 404 234 - "AppEngine-Google; (+http://code.google.com/appengine)" "beta83.themeviewersproject.appspot.com" ms=8 cpu_ms=140 cpm_usd=0.000026 queue_name=__cron task_name=96c49edb17d5ff7f351fe5e42cad6614 instance=00c61b117cd710c22ec657388074a6c119debab4 app_engine_release=1.9.7 trace_id=857193fe141b15961aa6a7f514b907f1

The troubleshooting information at the bottom of this page doesn't appear to help either as there is nothing under similar to bullet 3. What is wrong with my cron file?

1
404 means invalid url - marcadian
Right... That's why it isn't working. Not very useful since i know it's a problem with the cron url already - easycheese
have you read this part?target This is required. It identifies the app version the cron backup job is to be run on. You must use the value ah-builtin-python-bundle because that is the version of your app that contains the Datastore Admin features that the cron job needs to execute. Keep in mind that the cron backup job is running against this version of your app, so you incur costs when the cron backup job is running. (The ah-builtin-python-bundle version of your app is enabled when you enable Datastore admin for your app.) - marcadian
Yep, literally posted it a minute before you just did. - easycheese

1 Answers

0
votes

Figured it out. I missed the portion about . I had targeted my current version instead of the ones specified by the documentation:

This is required. It identifies the app version the cron backup job is to be run on. You must use the value ah-builtin-python-bundle because that is the version of your app that contains the Datastore Admin features that the cron job needs to execute.

Full cron should have been:

<cron>
        <url>/_ah/datastore_admin/backup.create?name=DataBackup&amp;kind=AppVersion&amp;filesystem=gs&amp;gs_bucket_name=zz_backups</url>
        <description>Backs up app data every day</description>
        <schedule>every 24 hours</schedule>
        <target>ah-builtin-python-bundle</target>
    </cron>