{"id":"8c08f956-9bfa-42a1-91bc-16528e865324","task":"List ClickHouse Cloud backups, set retention and frequency, attach a customer-owned backup bucket, and restore into a new service via the Cloud API","domain":"api.clickhouse.cloud","steps":["List backups (most recent first): GET /v1/organizations/{organizationId}/services/{serviceId}/backups. Each item includes id, status ('done'|'error'|'in_progress'), startedAt/finishedAt, sizeInBytes, durationInSeconds, type ('full'|'incremental'), and backupName.","Fetch one backup with GET /v1/organizations/{organizationId}/services/{serviceId}/backups/{backupId}.","Read current retention settings: GET /v1/organizations/{organizationId}/services/{serviceId}/backupConfiguration returns {backupPeriodInHours, backupRetentionPeriodInHours, backupStartTime}.","Update them with PATCH on the same path. backupRetentionPeriodInHours must be a whole number of days between 24 (1 day) and 1080 (45 days), i.e. a multiple of 24. backupStartTime is HH:MM evaluated in UTC. Setting any field to null resets it to its default.","curl -u \"$KEY_ID:$KEY_SECRET\" -X PATCH https://api.clickhouse.cloud/v1/organizations/$ORG_ID/services/$SERVICE_ID/backupConfiguration -H 'Content-Type: application/json' -d '{\"backupRetentionPeriodInHours\":720,\"backupStartTime\":\"02:00\"}'","To send backups to your own bucket, GET .../backupBucket to inspect the current config, then POST .../backupBucket with a provider-specific body - AWS: {\"bucketProvider\":\"AWS\",\"bucketPath\":...,\"iamRoleArn\":...,\"iamRoleSessionName\":...}; GCP: {\"bucketProvider\":\"GCP\",\"bucketPath\":...,\"accessKeyId\":...,\"secretAccessKey\":...} (HMAC keys); Azure: {\"bucketProvider\":\"AZURE\",\"containerName\":...,\"connectionString\":...}. Source all secret values from a secret manager, never from source control.","Change it with PATCH .../backupBucket (resend the provider's secrets) or remove it with DELETE .../backupBucket.","Restore by creating a NEW service from a backup: POST /v1/organizations/{organizationId}/services with the usual fields plus {\"backupId\":\"<backup-uuid>\"}. There is no in-place restore onto the original service.","curl -u \"$KEY_ID:$KEY_SECRET\" -X POST https://api.clickhouse.cloud/v1/organizations/$ORG_ID/services -H 'Content-Type: application/json' -d '{\"name\":\"restored svc\",\"provider\":\"aws\",\"region\":\"us-east-1\",\"backupId\":\"<backup-uuid>\"}'","Poll GET /v1/organizations/{organizationId}/services/{serviceId} on the new service until it reports 'running', then validate row counts against the source before cutting traffic over.","Docs: https://clickhouse.com/docs/cloud/manage/backups/overview and https://clickhouse.com/docs/cloud/manage/backups/configurable-backups"],"gotchas":["Restore is region- and tier-locked: the spec states that when backupId is used, the region and tier of the new instance must match the original. You cannot restore across regions or into a different tier.","Restoring always provisions a new service, which means a new hostname and a new default password - plan a DNS or connection-string cutover rather than expecting an in-place rollback.","backupRetentionPeriodInHours is capped at 1080 hours (45 days) and must be a multiple of 24. Odd hour counts or longer retention are rejected.","Setting backupStartTime resets the backup period to every 24 hours as a side effect. If you also want a custom backupPeriodInHours, set both in the same PATCH.","backupConfiguration and backupBucket writes require an admin-level key; a read-only or developer key is rejected.","backupBucket PATCH generally requires re-sending the provider's secret even when it has not changed - omitting it can fail or clear the stored credential.","Deleting a service eventually purges its backups per retention. Take a restore copy before deleting anything you might need."],"contributor":"mcsw-cloud-factory-20260802","created":"2026-08-02T21:35:17.943Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-02T21:35:17.943Z"},"url":"https://mcp.waymark.network/r/8c08f956-9bfa-42a1-91bc-16528e865324"}