Skip to content
You're viewing documentation for v2026.11.6-beta. It may be out of date.Go to latest
TimescaleDB Enterprise
Esc
↑↓navigate↵open⌘Jpreview

Get pgBackRest health

Runs pgbackrest info for the stanza of the service. When the service has no active backup repo, it runs nothing and returns not_applicable. When the service is not running and no deploy of it completed (also when the first deploy failed), it runs nothing and returns not_deployed with the error “The service is not deployed yet”. first_backup_pending tells that no backups is expected: the first backup runs, or an operation whose end starts a full backup runs or ended less than 15 minutes ago.

GET/api/v1/database-services/{id}/health/pgbackrest
Authorization
tse_sessionAPI key · cookierequired
Path parameters
idstringrequired
Responses
200

OK

backup_runningbooleanrequired
backupsPgbackrestBackupInfo[]
Show properties
Array of PgbackrestBackupInfo
checksum_errorsboolean

True when pgBackRest found invalid page checksums in the backup: some data files of the database are corrupt

database_idinteger<int64>
database_size_bytesinteger<int64>required
labelstringrequired
olderboolean

True for a backup of a database id older than the newest of its repo, from before a PostgreSQL major upgrade. It restores only into a new service on pg_version, never in place

pg_versionstring
prior_checksum_errorsboolean

True when a backup that this backup depends on (its full, and the diff of an incr) has invalid page checksums. A restore of this backup restores the corrupt files of that backup too, so it is refused like a backup with checksum_errors

repointeger<int64>
size_bytesinteger<int64>required

Bytes that this backup stored in the repo, after compression. The files of the backups that it depends on are not included

start_timestringrequired
stop_timestringrequired
typestringrequired
wal_startstring
wal_stopstring
coverageStanzaCoverageJSON
Show properties
assumes_archivingbooleanrequired
earlieststringrequired
endstringrequired
nowstringrequired
reposRepoCoverageJSON[]required
Show properties
Array of RepoCoverageJSON
backupsCoveredBackupJSON[]required
Show properties
Array of CoveredBackupJSON
checksum_errorsboolean

True when pgBackRest found invalid page checksums in the backup, or in a backup that it depends on (its full, and the diff of an incr). A restore of it is refused unless allow_checksum_errors is set

labelstringrequired
stop_timestringrequired
current_tliinteger<int32>required
min 0
database_idinteger<int64>

The pgBackRest database id of this coverage

earlieststringrequired
grant_fingerprintstring

The license grant fingerprint of a fork or recover that restores this database id: the cluster that the copy has. Only a live scan of the backups gives it

kindstringrequired
Allowed:localremote
olderboolean

True for a database id older than the newest of the stanza, from before a PostgreSQL major upgrade. Its times restore only into a new service on pg_version, and its coverage ends at its newest backup

pg_versionstring

The PostgreSQL major of the database id

repointeger<int64>required
wal_maxstringrequired
wal_minstringrequired
errorstring
first_backup_pendingboolean

True when the service has no backups only because its first backup did not end yet: the backup runs, or an operation whose end starts a full backup (a deploy, a restore, a major upgrade step) runs or ended less than 15 minutes ago on the console clock. The service health counts no backups as healthy then.

stanzastring
statusstringrequired

not_applicable: the service has no active backup repo. not_deployed: the service is not running and no deploy of it completed, so pgbackrest info did not run.

Allowed:healthywarningerrornot_applicablenot_deployed
wal_maxstring
wal_minstring
default

Error

codestring

Stable code of the refusal, when the route has codes

detailsstring[]

Additional detail, e.g. per-field validation failures

errorstringrequired

Human-readable error message

Request
curl -X GET 'https://console.example.com/api/v1/database-services/string/health/pgbackrest' \
  -H 'Cookie: tse_session=YOUR_API_KEY' \
  -H 'Accept: application/json'
Response
{
  "backup_running": true,
  "backups": [
    {
      "checksum_errors": true,
      "database_id": 0,
      "database_size_bytes": 0,
      "label": "string",
      "older": true,
      "pg_version": "string",
      "prior_checksum_errors": true,
      "repo": 0,
      "size_bytes": 0,
      "start_time": "string",
      "stop_time": "string",
      "type": "string",
      "wal_start": "string",
      "wal_stop": "string"
    }
  ],
  "coverage": {
    "assumes_archiving": true,
    "earliest": "string",
    "end": "string",
    "now": "string",
    "repos": [
      {
        "backups": [
          {
            "checksum_errors": true,
            "label": "string",
            "stop_time": "string"
          }
        ],
        "current_tli": 0,
        "database_id": 0,
        "earliest": "string",
        "grant_fingerprint": "string",
        "kind": "local",
        "older": true,
        "pg_version": "string",
        "repo": 0,
        "wal_max": "string",
        "wal_min": "string"
      }
    ]
  },
  "error": "string",
  "first_backup_pending": true,
  "stanza": "string",
  "status": "healthy",
  "wal_max": "string",
  "wal_min": "string"
}