cancel
Showing results for 
Search instead for 
Did you mean: 

Create/Restore Postgres DB Backup

hh
Explorer
0 Kudos
170

Hello together,

i try to restore a backup from a PostgreSQL on SAP BTP, hyperscaler option instance as described in the documentation with this command:

cf create-service postgresql-db standard backupdb -c '{"source_instance_id": <id>,“restore_time": <timestamp>}‘

But i get this error and do not find anything what is wrong:

Job (<job-guid>) failed: provision could not be completed: Service broker error: Service broker backing-services-broker-postgresql-db-cf-eu10-004 failed with: provisioning of instance <instance-guid> and plan <plan-guid> failed, cause: Cannot read properties of null (reading 'SnapshotCreateTime')

has anyone an idea about this SnapshotCreateTime? i can not find anything in the documentation :(.

Thanks and regards

heinrich

View Entire Topic
antoniojmnunes
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi, 

A database instance can be restored to any point in time within the backup retention period (last restorable time being before the last 15 mins), by creating a new DB instance, using the CF command as below:

cf create-service postgresql-db "<service_plan>" "<service_instance_name>" -c '{"source_instance_id": < >, "restore_time":< >}'
  • source_instance_id: indicates which DB instance data you want to use to restore.
  • restore_time: indicates a point in time until when the DB instance is restored. Time is expected in ISO8601 format: ‘YYYY-MM-DDThh:mm:ssZ

You must restore to the same service_plan as that of the source DB instance, and with the same configurations as that of the source DB instance. The parameters which are not at their default values should be specified in -c during restore, (-c parameters in JSON format).

PS: The product team is on the way to launch new features regarding backups and restore options for PostgreSQL, hyperscaler option, new documentation is being prepared and a set of blog posts will be released also, stay tuned.

Hope this helps.

Regards, Antonio 

hh
Explorer
0 Kudos

Hi Antonio,
that is exactly what i tried. But i get this error:
Job (<id>) failed: provision could not be completed: Service broker error: Service broker backing-services-broker-postgresql-db-cf-eu10-004 failed with: provisioning of instance <id> and plan <id> failed, cause: Cannot read properties of null (reading 'SnapshotCreateTime')

Regards, Heinrich

antoniojmnunes
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi, can you try to run the restore for a different instance ? What is the service plan that you are using and please provide also information about the region where you are trying to do the restore. Regards Antonio
hh
Explorer
0 Kudos

Hi Antonio, i tried different instances. Both have the service plan standard and are on eu_central_1

Here is the configuration:

{
"allow_access": "",
"audit_log_level": [
"DDL",
"ROLE"
],
"backup_retention_period": 14,
"cross_region_backup": false,
"db_parameters": [],
"engine_version": "15",
"locale": "en_US",
"maintenance_window": {
"day_of_week": "Saturday",
"duration": 1,
"start_hour_utc": 23
},
"memory": 2,
"multi_az": false,
"public_access": false,
"region": "eu-central-1",
"storage": 5
}

Thanks and regards,

Heinrich

antoniojmnunes
Product and Topic Expert
Product and Topic Expert
Hi, can you please open a support ticket using the component BC-CP-BSB-POSTGRES (please see how to https://help.sap.com/docs/PostgreSQL/b3fe3621fa4a4ed28d7bbe3d6d88f036/monitoring-and-troubleshooting). Add information regarding your global account Id, instance Id, region and the command line that you are executing to do the restore. I'll request the dev team to look into it. Regards, Antonio