Hugues
Hugues

Reputation: 653

Schedule backup on Google App Engine

I am trying to use the schedule backup mechanism from GAE but keep getting an error message than the cron.xml has a syntax error. The same error message appears using Google's samples.

I am using sdk 1.7.0

I. cron.xml file

<?xml version="1.0" encoding="UTF-8"?>
<cronentries>
  <cron>
    <url>/_ah/datastore_admin/backup.create?name=BackupToCloud&kind=LogTitle&kind=EventLog&filesystem=gs&gs_bucket_name=whitsend</url>
    <description>My Daily Backup</description>
    <schedule>every 12 hours</schedule>
    <target>ah-builtin-python-bundle</target>
  </cron>
</cronentries>

II. cron.xsd (the one provided by default)

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="cronentries" type="cronentries-Type"/>

  <xs:complexType name="cronentries-Type">
    <xs:sequence>
      <xs:element type="cron-Type" name="cron" maxOccurs="unbounded" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="cron-Type">
    <xs:all>
      <xs:element type="xs:string" name="url"/>
      <xs:element type="xs:string" name="description" minOccurs="0"/>
      <xs:element type="xs:string" name="schedule"/>
      <xs:element type="xs:string" name="timezone" minOccurs="0"/>
      <xs:element type="target-Type" name="target" minOccurs="0"/>
    </xs:all>
  </xs:complexType>

  <xs:simpleType name="target-Type">
    <xs:restriction base="xs:string">
      <xs:pattern value="[a-z\d\-]{1,100}"/>
    </xs:restriction>
  </xs:simpleType>

</xs:schema>

III. The error message

"The reference to entity "kind" must end with the ';' delimiter." I am getting the same error message when checking the xml validity using a on-line xml validator.

==> Did someone face the same issue and if so how did you solve it ?

Upvotes: 1

Views: 382

Answers (2)

aloo
aloo

Reputation: 5389

We (Streak.com) open sourced a tool that does automated backups as well as automated pushes of logs and datastore data into bigquery. The project is here: https://github.com/StreakYC/mache

Upvotes: 0

Shay Erlichmen
Shay Erlichmen

Reputation: 31928

Try escaping the & using &amp; read: replace & in the url element with &amp;

Upvotes: 2

Related Questions