# rds-restoration

Part of **RDS**

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

> 💡 **Path Selection**: This skill is one implementation path for [Migrate database data to or between RDS instances](../../intent/rds-migrate-data/SKILL.md). If you're unsure which path to take, check the routing skill first.

# ApsaraDB RDS Data Restoration Console Guide

## Operations Overview

| Operation | Console Entrance | Prerequisites | Description |
|----------|------------------|---------------|-------------|
| Restore Data to Self-Managed PostgreSQL | RDS > Instances > Select Instance > Backup & Restore > Download Backup Files | - RDS instance uses cloud disks<br>- Python 3 installed on target machine<br>- Target PostgreSQL does not have a database with the same name | Download RDS backup as CSV or SQL file for restoration to a self-managed PostgreSQL instance |

## Operation Steps

### Restore Data to Self-Managed PostgreSQL

**Navigation**: RDS Console > Instances > Select Instance > Backup & Restore > Download Backup Files

**Prerequisites**:
- Your RDS instance uses cloud disks
- Python 3 is installed on the target machine where the self-managed PostgreSQL runs
- The target self-managed PostgreSQL instance does not contain a database with the same name as the one being imported

1. Log on to the **ApsaraDB RDS console**
   - Element: **ApsaraDB RDS console** (link) — accessible via https://rds.console.aliyun.com
   - Notes: Ensure you are logged in with an account that has permissions to view and download backups for the target RDS instance.

2. In the left-side navigation pane, click **Instances**
   - Element: **Instances** (link) — located in the left navigation panel

3. Find your target RDS for PostgreSQL instance and click its **Instance ID**
   - Element: **Instance ID** (link) — appears as a clickable ID in the instances table row
   - Notes: A new page for the selected instance opens.

4. In the instance management page, click the **Backup & Restore** tab
   - Element: **Backup & Restore** (tab) — located in the top section of the instance details page

5. Locate the desired backup set and click **Download Backup Files**
   - Element: **Download Backup Files** (link) — appears in the "Backup Files" table under the Actions column
   - Notes: This action initiates the download of the backup file in either CSV or SQL format, depending on the backup type. Follow the on-screen instructions to complete the download.

6. After downloading, use the provided Python script (from documentation) to import the CSV or SQL file into your self-managed PostgreSQL instance.
   - Notes: This step occurs outside the console and requires local execution. Ensure network connectivity between your machine and the self-managed PostgreSQL instance.

**Form Fields**: None

## FAQ

Q: Where can I find the backup files for my RDS PostgreSQL instance?
A: Navigate to the RDS console > Instances > select your instance > Backup & Restore tab. Backup files are listed in the "Backup Files" table with a "Download Backup Files" link.

Q: Can I download backup files if my RDS instance uses local SSDs instead of cloud disks?
A: No. This restore method specifically requires that your RDS instance uses cloud disks. Local SSD instances do not support this backup download feature.

Q: What format are the downloadable backup files in?
A: Backup files can be downloaded as either CSV or SQL files, depending on the backup configuration of your RDS instance.

Q: Do I need special permissions to download backup files?
A: Yes. Your Alibaba Cloud account must have the necessary RAM permissions to access RDS backup data, typically granted via policies like AliyunRDSReadOnlyAccess or custom policies with rds:DescribeBackups and rds:DownloadDBLogFile permissions.

Q: Can I modify the backup file before importing it into my self-managed PostgreSQL?
A: Yes. Since the file is downloaded locally as CSV or SQL, you can edit it before running the import script, as long as the structure remains compatible with PostgreSQL.

## Pricing & Billing

### Billing Model
Backup file downloads are included in the standard ApsaraDB RDS service billing. There is no separate charge for downloading backup files for restoration purposes.

### Free Tier
No explicit cost mentioned; backup downloads are part of standard RDS service.

### Billing Notes
Backup file downloads are included in the RDS instance billing. No additional charges for this restore method.