# oceanbase-backup

Part of **OCEANBASE**

<!-- intent-backlink:auto -->

> 💡 **Path Selection**: This skill is one implementation path for [Import or export data to/from OceanBase](../../intent/oceanbase-import-data/SKILL.md). If you're unsure which path to take, check the routing skill first.

# OceanBase Backup, Recovery, and Migration Console Guide

## Operations Overview

| Operation | Console Entry | Prerequisites | Description |
|----------|---------------|---------------|-------------|
| Delete Expired Backups | Console > Database Management > Backup & Recovery > Manage Backups | The backup and restoration feature must be enabled; auto_delete_expired_backup must be set to false; user must have SYSDBA privileges | Manually delete expired backup sets through the console interface |
| View Backup Progress | Console > Database > Backup & Recovery > View Backup Progress | Access to an OceanBase database instance with backup enabled; user must have privileges to query system tables | Monitor real-time status and details of ongoing backup operations |
| Deploy OMS | Console > OMS > Deploy OMS | OceanBase Database instance already created; network connectivity between OMS and source/target databases; administrative access to deployment environment | Deploy OceanBase Migration Service (OMS) for data migration and synchronization tasks |

> **Note**: "Deploy NFS Server and Client" and "Import/Export Data via DataX" are command-line or configuration-file driven operations and do not involve console/GUI interactions. They are excluded from this guide per scope rules.

## Operation Steps

### Delete Expired Backups

**Navigation**: Console > Database Management > Backup & Recovery > Manage Backups

**Prerequisites**:
- The backup and restoration feature must be enabled
- The system parameter `auto_delete_expired_backup` must be set to `false` to allow manual deletion
- User must have SYSDBA privileges to perform deletion

1. Navigate to the Backup & Recovery section in the console  
   - Element: **Backup & Recovery** (link) — located in the left navigation panel  
   - Notes: Ensure you are in the correct tenant and cluster context before proceeding.

2. Locate the list of available backup sets  
   - Element: **Backup Sets** (tab) — in the main content area  
   - Notes: Expired backups are typically marked with a status like "Expired" or "Stale".

3. Select the backup set to delete and click Delete  
   - Element: **Delete** (button) — top-right corner of the backup sets table  
   - Notes: A confirmation dialog appears — click **Confirm** to proceed. This action cannot be undone.

### View Backup Progress

**Navigation**: Console > Database > Backup & Recovery > View Backup Progress

**Prerequisites**:
- Access to an OceanBase database instance with backup enabled
- User must have privileges to query system tables such as `CDB_OB_BACKUP_PROGRESS`

1. Connect to the OceanBase database using obclient  
   - Element: **obclient** (text_input) — terminal or command-line interface  
   - Notes: Ensure the connection targets the correct cluster and tenant.

2. Run the SQL query to view the current backup progress  
   - Element: **SELECT * FROM CDB_OB_BACKUP_PROGRESS;** (text_input) — SQL editor or command line  
   - Notes: For partition-specific queries, replace placeholder values in `table_id` and `partition_id` with actual identifiers. Results show real-time backup status, including log archive and data backup phases.

### Deploy OMS

**Navigation**: Console > OMS > Deploy OMS

**Prerequisites**:
- OceanBase Database instance already created
- Network connectivity between OMS and source/target databases
- Administrative access to the deployment environment

1. Click the 'Deploy OMS' button on the OMS dashboard  
   - Element: **Deploy OMS** (button) — top-right corner of the OMS dashboard  
   - Notes: Verify that sufficient CPU, memory, and storage resources are available.

2. Select the deployment region from the dropdown menu  
   - Element: **Region** (dropdown) — left navigation panel  
   - Notes: Choose a region geographically close to your source and target databases for lower latency.

3. Enter the cluster name in the provided text field  
   - Element: **Cluster Name** (text_input) — main content area  
   - Notes: The cluster name must be globally unique across all OMS deployments in your account.

4. Review the configuration summary and confirm deployment  
   - Element: **Confirm and Deploy** (button) — bottom of the configuration form  
   - Notes: Deployment may take up to 15 minutes. Wait for the success notification before proceeding to create migration tasks.

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Cluster Name | text_input | Yes | — | Unique identifier for the OMS cluster being deployed |
| Region | dropdown | Yes | China North, China East, International, US West | Geographic location for the OMS cluster deployment |
| Instance Type | dropdown | Yes | Small, Medium, Large, X-Large | Compute capacity of the OMS cluster |

## FAQ

Q: Where can I find expired backups in the console?  
A: Expired backups appear in the **Backup Sets** tab under **Console > Database Management > Backup & Recovery > Manage Backups**, typically labeled with an "Expired" status.

Q: Can I delete backups that are still within the recovery window?  
A: No. Only backups outside the configured `recovery_window` (and marked as expired) can be manually deleted when `auto_delete_expired_backup` is disabled.

Q: Do I need special permissions to view backup progress?  
A: Yes. You must have privileges to query system views like `CDB_OB_BACKUP_PROGRESS` and `CDB_OB_BACKUP_SET_DETAILS`, typically granted to DBAs or users with monitoring roles.

Q: What happens if I cancel an OMS deployment mid-process?  
A: Partial deployments may leave orphaned resources. It is recommended to wait for completion or use the console’s cleanup tools if the deployment fails.

Q: Is DataX accessible through the OceanBase Console?  
A: No. DataX is a command-line tool that uses JSON configuration files. It does not have a graphical interface in the OceanBase Console.

## Pricing & Billing

### Billing Model
OMS is billed on a **per-instance-hour** basis depending on the selected instance type.

### Price Reference

| Tier | Price (CNY/hour) |
|------|------------------|
| Small | 0.05 |
| Medium | 0.10 |
| Large | 0.20 |
| X-Large | 0.40 |

### Free Tier
10 free hours per month for new OMS deployments.

### Billing Notes
Billing starts immediately after successful deployment and stops when the OMS cluster is terminated. Charges are based on actual runtime duration. Backup deletion and progress monitoring operations are free of charge.