Skip to main content
Version: 1.2

SQLServer Restore

Prerequisites

  • SQLServer database asset
  • Workload Identity used for database authentication
  • Storage bucket asset
  • Storage bucket asset credentials

Procedure from web console

  • Navigate to the tasks page: Operations > Tasks (or go directly to /home/operations/tasks)
  • Click on Create Task button
  • Select SQLServer restore
  • Fill out the SQLServer restore task form with the following information:
    • Task name: Enter a descriptive name for your restore task
    • The SQLServer asset to restore to: Select the target SQLServer instance from the dropdown
    • SQLServer credential: Select the credential to access the SQLServer instance
    • The database name to restore: Specify the name of the database you want to restore
    • The Bucket asset where backups are stored: Choose the storage bucket containing the backup from the dropdown
    • Bucket credential: Select the credential to access the storage bucket
    • The restore path: Define the path within the bucket where the backup files are located
    • Storage class for backup volume : Select the storage class to use for the temporary volume (optional)
    • Storage size for backup volume: Specify the disk size (e.g., 1Gi, 5Gi) (optional). Default value: 10Gi
  • Click Next to continue with the task configuration
  • Select the target cluster where you want to execute the restore task (optional - if not specified, the task will run on the default cluster)
  • Review the task configuration summary
  • Click Create Task to execute the SQLServer restore task

Procedure from CLI

Create a YAML file with the SQLServer restore task configuration:

apiVersion: operations.resiliency.io/v1alpha1
kind: Task
metadata:
name: <task-name>
namespace: resiliency-system
spec:
placement:
clusterName: <target-cluster-id>
credentialName: <cluster-credential-name>
templateRef:
templateName: sqlserver-restore
params:
- name: sqlserver-asset
value: <sqlserver-asset-id>
- name: sqlserver-database
value: <database-name>
- name: bucket-asset
value: <bucket-asset-id>
- name: restore-path
value: <path-to-backup-in-bucket>
- name: sqlserver-credential
value: <sqlserver-credential-name>
- name: bucket-credential
value: <bucket-credential-name>
- name: pvc-storage-class
value: <storage-class-name>
- name: pvc-size
value: "<disk-size-in-gi>"

Apply the task to the cluster

    kubectl apply -f sqlserver-restore-task.yaml

Note:

  • Replace the placeholder values (<task-name>, <sqlserver-asset-id>, etc.) with your actual configuration values
  • This task will perform a one-time SQLServer restore operation from the specified backup path
  • The restore-path should point to the location of your backup files within the bucket