Kboyz
Kboyz

Reputation: 189

Modify Datastore Admin Backup Built-in Task Queue

I'm new to Datastore. Currently, I'm using datastore admin to backup my data but I'm wondering if we can modify or override the built-in task queue on datastore admin /_ah/datastore_admin/backup.create?

What I want to do when exporting the data from datastore is that I would only need to export the data that has specific date range that I specify. I saw on the documentation that you can pass a parameter to the URL. Is its possible to pass the parameter on the date range like this one? /_ah/datastore_admin/backup.create?name=MyBackup&StartDate=12-01-20&EndDate=01-12-21.

Please let me know if I miss something.

Upvotes: 0

Views: 96

Answers (1)

Gwyn Howell
Gwyn Howell

Reputation: 5424

The datastore admin is deprecated. You should upgrade to the datastore export service.

But to answer your question, the datastore admin app hosted at /_ah/datastore_admin is an internal app which you cannot modify. However, you could write a custom handler to kick off the backup process, thereby passing in the params you need.

GAE example using taskqueue API:

params = {
    'StartDate': start_date,
    'EndDate': end_date
}

taskqueue.add(
    url='/_ah/datastore_admin/backup.create',
    params=params, 
    target='ah-builtin-python-bundle'
)

Again, I do not recommend this approach, as the service has been long deprecated and is due to disappear at any moment.

Upvotes: 1

Related Questions