Description:

This check verifies that Point-in-Time Recovery (PITR) is enabled for Utho Cloud-managed databases. PITR allows a database to be restored to a specific point in time within the available recovery window. Enabling PITR helps protect databases from accidental deletion, data corruption, or unintended changes.


Rationale:

Without PITR, recovery may be limited to the most recent available backup, potentially resulting in data loss.

This check helps:

  • Recover databases after accidental data changes.

  • Minimize data loss during database incidents.

  • Improve database recovery capabilities.

  • Support business continuity and disaster recovery requirements.


Impact:

  • Provides an additional recovery option for managed databases.

  • Reduces the potential amount of data lost during a database incident.

  • PITR may consume additional backup/storage resources and increase costs.

  • Restoring to an earlier point in time may temporarily affect database availability.


Default Value:

PITR should be enabled for Utho Cloud managed databases where point-in-time recovery is required.

A database is considered non-compliant if PITR is disabled or the database does not have an active point-in-time recovery configuration.


Prerequisites:

  • Utho Cloud account.

  • Permissions to view database backup and recovery settings.

  • Access to the Utho Cloud Console or Utho API.

  • At least one Utho managed database cluster.


Test Plan:

Note: In the UTHO UI, we are unable to see the pitr is enabled or not


Using the Utho API:

curl -s -X GET "https://api.utho.com/v2/databases" \
  -H "Authorization: Bearer $UTHO_API_TOKEN" \
  -H "Content-Type: application/json" | jq

Retrieve an individual database cluster:

curl -s -X GET "https://api.utho.com/v2/databases/<CLUSTER_ID>" \
  -H "Authorization: Bearer $UTHO_API_TOKEN" \
  -H "Content-Type: application/json" | jq

Implementation Plan:

Note: In the UTHO UI, we can't enable the pitr

Using the Utho API:

If supported by the Utho API, enable PITR using the database backup/recovery configuration endpoint:

curl -s -X POST "https://api.utho.com/v2/databases/<CLUSTER_ID>"/pitr-enabled" \
  -H "Authorization: Bearer $UTHO_API_TOKEN" \
  -H "Content-Type: application/json" | jq

Confirm the exact Utho API field and endpoint for PITR before using the remediation command, as the available configuration may vary by database engine.


Backout Plan:

Note: In the UTHO UI, we can't disable the pitr

curl -s -X POST "https://api.utho.com/v2/databases/<CLUSTER_ID>/pitr-disabled" \
  -H "Authorization: Bearer $UTHO_API_TOKEN" \
  -H "Content-Type: application/json" | jq

References: