Wednesday, May 3, 2017

[google-cloud-sql-discuss] Re: How to Identify On-Demand Backups via gcloud?

Logged b/37946645.

On Tuesday, May 2, 2017 at 9:47:42 AM UTC-7, Skyler Slade wrote:

Hi there,


I like to identify on-demand backups (vs. automatic backups) via gcloud. For example, I see these backups in the console:

Using gcloud, I can request a list of backups
    gcloud sql backups list --instance=my-instance-name --format=json

This gives a document like this for all backups:

  {
    "backupConfiguration": "99033b25-2e89-456a-b443-6ea0dcd7d43d",
    "dueTime": "2017-04-21T06:34:20.432000+00:00",
    "endTime": "2017-04-21T06:38:10.200000+00:00",
    "enqueuedTime": "2017-04-21T06:34:20.432000+00:00",
    "instance": "my-instance-name",
    "kind": "sql#backupRun",
    "startTime": "2017-04-21T06:34:20.432000+00:00",
    "status": "SUCCESSFUL"
  }

However, this object doesn't indicate if the backup was automatic or on-demand. Additionally, the gcloud command to describe a backup shows similar output and doesn't indicate if it was automatic or on-demand. For example,

$ gcloud sql backups describe "2017-04-28T05:00:00.538000+00:00" --instance=my-instance-name
backupConfiguration: 99033b25-2e89-456a-b443-6ea0dcd7d43d
dueTime: '2017-04-28T05:00:00.538000+00:00'
endTime: '2017-04-28T08:04:18.427000+00:00'
enqueuedTime: '2017-04-28T08:00:39.424000+00:00'
instance: my-instance-name
kind: sql#backupRun
startTime: '2017-04-28T08:00:39.429000+00:00'
status: SUCCESSFUL

Is it possible using gcloud to differentiate between automatic backups and on-demand backups? Potentially I could add a "this is on-demand" description to each on-demand backup that I perform, however, the description does not appear to be returned in the above output.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/ca9abaee-c88a-4e38-966f-f7ed70c67932%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment