Introduction to Backups
What Are Database Backups
RDS for MariaDB automatically creates backups for DB instances during the backup time window. The backups are stored based on a preset retention period (1 to 732 days).
A backup file is generated each time a backup is complete. If the instance fails or data is damaged, you can use the backup to restore the instance, ensuring data availability.
Backup Types
RDS for MariaDB supports multiple backup types. For details, see Backup Types.
Where Data Is Backed Up
- Single-node instance
It uses a standalone architecture, which is more cost-effective than mainstream primary/standby DB instances. After a backup is triggered, data is backed up from the primary instance and stored as a package on OBS. The backup does not take up storage space of the instance.
- Primary/standby instance
It uses an HA architecture. In a primary/standby pair, each instance has the same instance class. After a backup task is triggered, data is backed up from the standby instance (or from the primary instance only when there is a long primary/standby replication delay) and stored as a package on OBS. The backup does not take up storage space of the instance.
If a database or table in the primary instance is maliciously or mistakenly deleted, the database or table in the standby instance will also be deleted. In this case, you can only use backups to restore the deleted data.
How Data Is Backed Up
RDS for MariaDB automated backup is enabled by default and cannot be disabled. RDS for MariaDB performs automated full backups based on the time window and cycle specified in the backup policy. It also backs up data changes made after the most recent automated full or binlog backup every 5 minutes or when a certain amount of incremental data is generated. When you restore an instance to a point in time, the most recent full backup will be downloaded from OBS for restoration. After the restoration is complete, binlog backups will be replayed to the specified point in time.
Backup Solutions
Table 1 describes how to back up data and download backups.
|
Task |
Backup Type |
Description |
|---|---|---|
|
Backing up data |
RDS automatically creates full backups for your instance during a backup window you specified and saves the backups based on the configured retention period. If necessary, you can restore data to any point in time within the backup retention period. Once the automated backup policy is enabled, a full physical backup is triggered immediately. After that, full backups will be created according to the specified time window and backup cycle. Incremental backups are automatically created every 5 minutes to ensure data reliability. |
|
|
Manual backups are user-initiated full backups of instances. The backup method is physical backup. Manual backups will not be deleted until you delete them manually. |
||
|
Incremental backups are binary log (binlog) backups. Binary logging is enabled for RDS for MariaDB instances by default. You do not need to set an interval for incremental backups because RDS automatically backs up incremental data every 5 minutes. Incremental backups can be used to restore data to a specific point in time. |
||
|
Downloading backups |
You can use OBS Browser+, the browser, or the download URL to download a full backup. |
|
|
You can download a single binlog file or merged binlog file. To download a merged binlog file, use any of the following methods: OBS Browser+, the browser, or the download URL. |
Backup Compression Ratio
RDS uses sysbench to import data models and a certain amount of data. After data is backed up, the compression ratio is about 80%. The more duplicate data there is, the higher the compression ratio is.
Compression ratio = Space occupied by backup files/Space occupied by data files x 100%
Billing
Backups are saved as packages in OBS buckets. Backups occupy backup space in OBS. If the free space RDS provides is used up, the additional space required will be billed. For the billing details, see How Is RDS Backup Data Billed?
Deleting Backups
- Manual backups and automated backups can be deleted in different ways:
- Manual backups can only be manually deleted.
- Automated backups cannot be manually deleted. You can adjust their retention period by referring to Configuring a Same-Region Backup Policy, and backups that expire will be automatically deleted.
- Local binlogs
If the retention period is set to 0, the binlogs of your RDS instance will be deleted once they are synchronized to the standby instance and read replicas and successfully backed up to OBS.
If the retention period is set to a value greater than 0, for example, 1 day, the binlogs will be retained for one day after they are synchronized to the standby instance and read replicas from the primary instance and successfully backed up. After the retention period expires, the binlogs will be automatically deleted.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot