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.
-
Run the List MySQL Managed Databases operation.
-
Locate the desired database in the response—for example, based on its
label—and note the following values:-
id. This is the unique identifier for the database. Store this as your database'ssource. -
status. This needs to beactive,degraded, orfailed. You can't restore a database if it shows any otherstatus. -
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 theoldest_restore_timeandupdatedvalues.
-
Run the restore
-
Run the Create or restore a MySQL Managed Database operation and build the request using the
forkobject:{ "fork": { "source": 12457 "restore_time": "2026-04-10T19:55:12", } }-
source. The target database'sidthat you stored as itssource. -
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 theoldest_restore_timeandupdatedtimes you noted. The API will restore to the closest backed up time for the target database.
-
-
Store the
idfor 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 itsstatusisactivebefore 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'