Hi,
I deleted a Postgres database but now I’d like to recover a backup from it. The backup is still there, I can see it with the CLI:
gcloud sql backups list --project=PROJECT_ID -i -
ID WINDOW_START_TIME ERROR STATUS INSTANCE
[ ... snip ...]
1670050800000 2022-12-03T07:00:00.000+00:00 - SUCCESSFUL OLD_DATABASE_NAME
This blog post seems to imply it should be possible to restore the backup to a new Postgres instance. But that doesn’t work. From the CLI, I see a 503 error code:
$ gcloud sql backups restore 1670050800000 \
> --restore-instance=NEW_DATABASE_NAME \
> --project=PROJECT_NAME \
> --backup-instance=OLD_DATABASE_NAME
All current data on the instance will be lost when the backup is restored.
Do you want to continue (Y/n)? y
ERROR: (gcloud.sql.backups.restore) HttpError accessing <https://sqladmin.googleapis.com/sql/v1beta4/projects/PROJECT_NAME/instances/NEW_DATABASE_NAME/restoreBackup?alt=json>: response: <{'vary': 'Origin, X-Origin, Referer', 'content-type': 'application/json; charset=UTF-8', 'content-encoding': 'gzip', 'date': 'Sat, 03 Dec 2022 12:26:23 GMT', 'server': 'ESF', 'cache-control': 'private', 'x-xss-protection': '0', 'x-frame-options': 'SAMEORIGIN', 'x-content-type-options': 'nosniff', 'alt-svc': 'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"', 'transfer-encoding': 'chunked', 'status': 503}>, content <{
"error": {
"code": 503,
"message": "Service temporarily unavailable.",
"errors": [
{
"message": "Service temporarily unavailable.",
"domain": "global",
"reason": "serverException"
}
]
}
}
And from the “Activity” tab on the dashboard, I see a different 500 error:
Error message Internal error (HTTP 500): RPC error looking up backup run for source instance
Has anyone been able to do this successfully?