GCP SQL Database Backup and Restore with Backup and DR Service

GCP SQL Database Backup and Restore with Backup and DR Service

Step-by-Step Configuration Guide

1. Adding the Host

  1. Navigate to the Backup and DR Management Console
  2. Click on Manage > ADD Host
  3. Provide the basic host details:
  • Hostname or IP address
  • Operating system type
  • Connection credentials
  • Description (optional)

2. Installing the GCP Backup and DR Agent

  1. Download the appropriate agent package for your SQL server’s OS
  2. Run the installation command on the SQL server host:
   sudo ./installer --host=<backup-dr-manager-ip> --port=7006</backup-dr-manager-ip>
SQL
  1. Important: Copy the secret key displayed during installation (you’ll need this later)

3. Registering the Host in Backup and DR Console

  1. Go to Manage > Hosts
  2. Search for your newly added SQL host
  3. Click Edit on the host entry

4. Applying the Agent Secret

  1. In the host edit screen, locate the Backup and DR Agent settings section
  2. Paste the secret key you copied during agent installation
  3. Save the configuration

5. Creating a Backup Template (if needed)

  1. Navigate to Templates section
  2. Click Create Template
  3. Configure backup policy settings:
  • Backup frequency (daily, weekly, etc.)
  • Retention period
  • Storage location (regional/multi-regional)
  • Encryption settings
  1. Save the template

6. Configuring SQL Server Backups

  1. Go to Backup and Recover > Backup
  2. Select Microsoft SQL Server from the options
  3. Search for and select your SQL host
  4. Click Next to proceed

7. Finalizing Backup Configuration

  1. Select the databases you want to protect
  2. Choose your backup template or create a new one
  3. Configure any advanced options:
  • Full vs. differential backups
  • Log backup frequency
  • Pre/post backup scripts
  1. Review and confirm your settings
  2. Click Finish to enable protection

Restore Process

Full Database Restore

  1. Navigate to Backup and Recover > Recover
  2. Select your SQL server instance
  3. Choose the backup point in time
  4. Select the database(s) to restore
  5. Specify restore location (original or alternate)
  6. Initiate the restore process

Point-in-Time Recovery

  1. Follow steps 1-3 above
  2. Enable “Point-in-Time Recovery” option
  3. Select the specific recovery time
  4. Complete the restore process

Best Practices

  • Test restores regularly to validate your backup strategy
  • Monitor backup jobs and set up alerts for failures
  • Consider multi-region backups for critical databases
  • Document your RPO (Recovery Point Objective) and RTO (Recovery Time Objective)

This configuration ensures your GCP SQL databases are protected with enterprise-grade backup capabilities, allowing for both full database restores and granular point-in-time recovery.

Leave a Reply

Your email address will not be published. Required fields are marked *