For the complete documentation index, see llms.txt. This page is also available as Markdown.

Point-In-Time Restore

Point-In-Time Recovery (PITR) for MariaDB Cloud restores a database to a specific moment within retained binary logs; not supported on Enterprise Cluster Tech Preview.

Authentication

Go to the MariaDB Cloud API Key management page and generate an API key. Export the value from the token field to an environment variable $API_KEYexport API_KEY='... key data ...'

Use it on subsequent request, e.g: bash curl --request

GET 'https://api.skysql.com/skybackup/v1/backups/schedules' \
    --header "X-API-Key: ${API_KEY}"

Important Note

For Point-in-Time Restore to work, you must have a preconfigured backup schedule that ensures:

  • Your backup schedule creates snapshot backups with a time gap shorter than your expire_logs_days database configuration setting (required for binary log availability)

  • Your selected restore point must be between two consecutive snapshot backups from this schedule

  • By default, MariaDB Cloud sets expire_logs_days to 4 days, but you can configure this value to match your backup schedule requirements

Usage Examples

API Example

  • API_KEY : SKYSQL API KEY, see MariaDB Cloud API Keys

  • SERVICE_ID : MariaDB Cloud service identifier, format dbtxxxxxx. This is your restore target service

  • BACKUP_SOURCE_SERVICE_ID: MariaDB Cloud service identifier, format dbtxxxxxx. This is your backup source service id

  • You can fetch the MariaDB Cloud service identifier from the Fully Qualified Domain Name (FQDN) of your service. For example: in dbpgf17106534.sysp0000.db2.skysql.com, 'dbpgf17106534' is the service ID. You will find the FQDN in the Connect window

MariaDB Cloud Portal Example

To perform a Point-in-Time Restore through the MariaDB Cloud Portal:

  1. Navigate to Backups→Restores

  2. Click the "Point-in-Time Restore" Button

  3. In the restore form, provide:

    1. Database restore target service

    2. Backup source service

    3. Selected restoration point in time

  4. Click the "Restore" button to start the restore process

Limitations

  • Cross-cloud restore is not supported. Your restore target service must be in the same cloud provider as your backup source service.

  • Only MariaDB Cloud native snapshots can be used as restore source. External backups are not supported for Point-in-Time Restore.

  • Point-in-Time Restore requires MariaDB 10.8 or later, which introduced the binary log search functionality needed for this feature.

  • Support for Serverless databases as Point-in-Time Restore sources is coming soon.

Last updated

Was this helpful?