An open API service indexing awesome lists of open source software.

https://github.com/mondo-mob/spring-gae-datastore-backup

Google App Engine Datastore Backup Service
https://github.com/mondo-mob/spring-gae-datastore-backup

Last synced: 4 months ago
JSON representation

Google App Engine Datastore Backup Service

Awesome Lists containing this project

README

        

Backup Service (Java 8)
=======================

This app provides functionality to perform a Google Cloud Datastore backup.

It should be deployed as a separate App Engine service called "backup-service".

### Running locally

mvn appengine:run

### Deploying

CLOUDSDK_CORE_PROJECT={PROJECT_ID} mvn appengine:deploy

where `{PROJECT_ID}` is your GCP project id.

Usage
=====

Configure a cron and a task queue in your default service as per the instructions here: https://github.com/3wks/spring-boot-gae/blob/master/README-DATASTORE-BACKUP.md

Note that the cron and task must both be configured with `target: backup-service` to ensure they hit this service.

You cannot add `cron.xml` or `queue.xml` to this service, it must be added to your default service (ie: your main application).

Backup and Import to BigQuery
=======

As well as regular backups you can configure automatic export and import into BigQuery.
This is a full import/export and any existing data in BigQuery will be deleted for the requested kinds.

### Endpoint

Task endpoint: `/task/bigquery/datastore-export-and-load`

Params:

| Property | Description | Required |
| ------------- |------------- | -----------|
| name | name for the datastore export | N |
| dataset | the target dataset for the import in BigQuery | Y |
| kinds | the datastore kinds to be exported | Y |
| namespaceId | optional namespace id to filter by. Only a single namespace is supported. | N |

### Usage

In your default service schedule a cron to trigger an ETL job with target of `backup-service`.

e.g. for XML config

```

/task/bigquery/datastore-export-and-load?name=ExportToBigQuery&dataset=backup_data&kinds=Kind1,Kind2,Kind3
Datastore export and load to BigQuery
backup-service
every day 03:00
Australia/NSW

```
or yaml
```
- description: "Datastore export and load to BigQuery"
url: /task/bigquery/datastore-export-and-load?name=ExportToBigQuery&dataset=backup_data&kinds=Kind1,Kind2,Kind3
target: backup-service
schedule: every day 03:00
timezone: Australia/NSW
```