External Backups/Snapshots for Google Cloud Spanner

前端 未结 4 1678
轮回少年
轮回少年 2021-02-13 14:39

Is it possible to snapshot a Google Cloud Spanner Database/table(s)? For compliance reasons we have to have daily snapshots of the current database that can be rolled back to in

4条回答
  •  别那么骄傲
    2021-02-13 15:12

    Per the thread below (also answered by eb80), I have been able to successfully script my backups from Spanner using their Import/Export DataFlow jobs by building the templates and running the gcloud command out of a cron job. The catch is that when you schedule the job you need to parse the output and get the job ID so that you can then check the status of it (again, I scripted that) and when you get JOB_STATE_DONE or JOB_STATE_FAILED, it's complete. If you need to run the Import, you'll need that job ID because the specific backup folder structure is:

    gs://bucketName/yourFolder/instanceId-databaseId-jobId

    How to batch load custom Avro data generated from another source?

提交回复
热议问题