Managing backups
You can create backups and restore clusters from existing backups.
Getting a list of backups
To get a list of cluster backups:
- Go to the folder page and select Managed Service for SQL Server.
- Click on the name of the cluster you need and select the tab Backup copies.
To get a list of cluster backups, use the listBackups API method and pass the cluster ID in the clusterId
request parameter.
To get a list of backups for all the Managed Service for SQL Server clusters in the folder, use the list API method and pass the folder ID in the folderId
request parameter.
To find out the cluster ID, get a list of clusters in the folder.
Getting information about backups
To get information about the backup of an existing cluster:
- Go to the folder page and select Managed Service for SQL Server.
- Click on the name of the cluster you need and select the tab Backup copies.
To get information about a backup, use the get API method and pass the backup ID in the backupId
request parameter. To find out the ID, get a list of backups.
Creating backups
- Go to the folder page and select Managed Service for SQL Server.
- Click on the name of the cluster you need and select the tab Backup copies.
- Click Create a backup.
Managed Service for SQL Server launches the operation to create a backup.
Use the backup API method and pass the cluster ID in the clusterId
request parameter.
To find out the cluster ID, get a list of clusters in the folder.
Restoring clusters from backups
When you restore a cluster from a backup, you create a new cluster with the data from the backup. If the folder has insufficient resources to create such a cluster, you will not be able to restore from the backup.
For a new cluster, you need to set up all its parameters required at creation.
To restore an existing cluster from a backup:
- Go to the folder page and select Managed Service for SQL Server.
- Click on the name of the cluster you need and select the tab Backup copies.
- Click for the backup and click Restore cluster.
- Set up the new cluster. You can select a folder for the new cluster from the Folder list.
- Click Restore cluster.
Managed Service for SQL Server launches the operation to create a cluster from a backup.
Use the restore API method and pass the following in the request:
- ID of the desired backup, in the
backupId
parameter. To find out the ID, get a list of backups. - Timestamp of the moment to which the cluster should be restored, in the
time
parameter. - The name of the new cluster that will contain the data recovered from the backup. The cluster name must be unique within the folder.
Editing the backup start time
To change the backup start time for a cluster, use the update method and pass the following in the request:
- The cluster ID, in the
clusterId
parameter. To find out the cluster ID, get a list of clusters in the folder. - The new backup start time, in the
configSpec.backupWindowStart
parameter. - List of cluster configuration fields to be changed (in this case,
configSpec.backupWindowStart
), in theupdateMask
parameter.
Warning
This API method resets any cluster settings that aren't passed explicitly in the request to their defaults. To avoid this, in the updateMask
parameter, list the settings you want to change (in a single line, separated by commas).