GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — java-docs-samples/appengine-java8/datastore-schedule-export at master · niyata/java-docs-samples

Expand file tree

/

datastore-schedule-export

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

datastore-schedule-export

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
src
src
 
 
README.md
README.md
 
 
cron.yaml
cron.yaml
 
 
pom.xml
pom.xml
 
 

README.md

Outline

Scheduling a Cloud Datastore export

This Google App Engine (GAE) app receives export requests at /cloud-datastore-export and sends an export request to the Cloud Datastore Admin API.

Before you begin

This app requires the following to complete export operations:

  1. A Google Cloud project with billing enabled.
  2. A Cloud Storage bucket for your export files.
  3. The App Engine default service account must have permission to write to the Cloud Storage bucket and have the Cloud Datastore Import Export Admin IAM role.

For more information on completing these requirements, see the Cloud Datastore documentation.

Deploying

Set the target project in gcloud:

gcloud config set project PROJECT_NAME

Deploy the GAE app:

mvn appengine:deploy

The app takes the following parameters:

  • output_url_prefix (required)-specifies where to save your Cloud Datastore export. If the URL ends with a /, it's used as is. Otherwise, the app adds a timesamp to the url.
  • kind (optional, multiple)-restricts export to only these kinds.
  • namespace_id (optional, multiple)-restricts export to only these namespaces.

Modify and deploy the cronjob:

gcloud app deploy cron.yaml

You can test your cron job by running the job manually:

Open the Cron Jobs page

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.