Restore a Managed Database backup

Managed Databases are automatically backed up for you and you can restore one to a specific point in time.

Get database information

To start, you need to get a few specific details about the MySQL Managed Database you want to restore.

  1. Run the List MySQL Managed Databases operation.

  2. Locate the desired database in the responsefor example, based on its labeland note the following values:

    • id. This is the unique identifier for the database. Store this as your database's source.

    • status. This needs to be active, degraded, or failed. You can't restore a database if it shows any other status.

    • oldest_restore_time. You can restore the database to any time that is more recent than this.

    • updated. This is the last time an update was recorded to the database. You can restore the database to any time before this.

    • updates. Review this object to determine when the last successful maintenance was performed on the database, relative to the time between the oldest_restore_time and updated values.

Run the restore

  1. Run the Create or restore a MySQL Managed Database operation and build the request using the fork object:

    {
      "fork": {
        "source": 12457
        "restore_time": "2026-04-10T19:55:12",
      }
    }
    • source. The target database's id that you stored as its source.

    • restore_time. The date and time to which you want to restore the database, in YYYY-MM-DD:HH:MM:SS format. This needs to be between the oldest_restore_time and updated times you noted. The API will restore to the closest backed up time for the target database.

  2. Store the id for the restored database.

Delete the old database

Restoring from a backup creates a second running cluster, which incurs billing. You can delete the original database after the restore is complete, to avoid this billing.

🚧

Ensure the restore is complete before deleting the original database. Run the Get a MySQL Managed Database operation and target the new database, based on its id. Then, verify that its status is active before continuing with the delete of the old one.

Run the Delete a MySQL Managed Database operation, targeting the old database, using its source identifier as the mysqlInstanceId:

curl --request DELETE \
     --url https://api.linode.com/v4/databases/mysql/instances/12457 \
     --header 'accept: application/json'