In most cases, the data files of an ApsaraDB RDS for SQL Server instance are stored on Enterprise SSDs (ESSDs). The storage costs increase with the data volume. To reduce costs and increase efficiency, ApsaraDB RDS for SQL Server provides the database-level data archiving feature. You can use the feature to store data to an Object Storage Service (OSS) bucket. You can convert infrequently accessed online databases into cold storage databases on the Databases page of the ApsaraDB RDS console or by calling API operations. Cold data is stored in an OSS bucket at low costs. This helps separate hot data from cold data and reduce storage costs.
Feature description
ApsaraDB RDS for SQL Server works with OSS to manage data files and transfer the data files between cloud disks and OSS buckets based on the database detachment and attachment feature of native SQL Server. You can convert an online database into a cold storage database with a few clicks in the ApsaraDB RDS console. After the conversion, data files are migrated from a cloud disk to an OSS bucket. This significantly reduces storage costs. If you want to read data from or write data to a cold storage database, you can also convert a cold storage database into an online database with a few clicks in the ApsaraDB RDS console. The process is convenient and lossless.
Benefits
Cost reduction: You can convert infrequently accessed online databases into cold storage databases and store data in OSS buckets at low costs. This significantly reduces storage costs.
Unlimited capacity: Compared with traditional storage media, the amount of data that can be stored in OSS buckets is not limited. You can store an unlimited amount of archived data in OSS buckets.
High reliability at low costs: OSS features low cost and highly reliability. This allows you to store data in a cost-effective manner and ensures data security and reliability.
No service impact: The data archiving feature does not cause downtime of your RDS instance or affect the operations on the RDS instance. This ensures business continuity and stability.
Prerequisites
The RDS instance meets the following requirements:
The RDS instance runs RDS Basic Edition.
The RDS instance uses the ESSD storage type.
The RDS instance uses the subscription or pay-as-you-go billing method. Serverless instances are not supported.
The RDS instance does not reside in one of the following regions: Thailand (Bangkok), South Korea (Seoul), Australia (Sydney) (Closing Down), UK (London), and UAE (Dubai).
Usage notes
Cold data archiving and restoration involve the transfer of database files between cloud disks and OSS buckets. If the database files are large, the transfer requires a long period of time to complete.
Limits
Read and write operations on cold storage databases: After you convert an online database into a cold storage database, you cannot directly access the cold storage database to perform read and write operations. To perform read and write operations, you can convert the cold storage database into an online database.
Upgrade of RDS editions: If you enable the data archiving feature for an RDS instance that runs RDS Basic Edition and uses cloud disks, you cannot upgrade the RDS edition of the RDS instance.
Backup and restoration of cold storage databases: You cannot back up or restore cold storage databases.
Data restoration: You can restore only databases whose data is included in the backup sets of your RDS instance. The databases cannot be cold storage databases. If a database is converted into a cold storage database, the database cannot be restored. For more information, see Restore the data of an ApsaraDB RDS for SQL Server instance.
Databases with duplicate names: If an online database has the same name as a cold storage database, you cannot delete the databases. In this case, you can call the ModifyDatabaseConfig operation to convert the cold storage database into an online database with a different name. For more information, see ModifyDatabaseConfig.
Number of cold storage databases: You can convert up to 15 online databases on an RDS instance into cold storage databases.
Billing rules
After you archive data to an OSS bucket, you are charged for OSS cold storage on a pay-as-you-go basis. The following table describes the unit prices.
RDS Basic Edition
Region | Unit price |
China (Zhangjiakou), China (Hohhot), China (Ulanqab), China (Guangzhou), China (Hangzhou), China (Shenzhen), China (Chengdu), China (Qingdao), China (Shanghai), China (Beijing), and China (Heyuan) | USD 0.000032 per GB-hour |
China (Hong Kong), Singapore, Germany (Frankfurt), Japan (Tokyo), and Indonesia (Jakarta) | USD 0.000034 per GB-hour |
US (Virginia) | USD 0.000054 per GB-hour |
Malaysia (Kuala Lumpur) | USD 0.000057 per GB-hour |
USA (Silicon Valley) and Philippines (Manila) | USD 0.000058 per GB-hour |
Use the data archiving feature
The data archiving feature is automatically enabled for an RDS instance that uses ESSDs. You can convert between online databases and cold storage databases.
Step 1: Convert an online database into a cold storage database
Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
In the left-side navigation pane, click Databases.
Find the required database. Then, click More and select Convert Online Database to Cold Storage Database in the Actions column of the database.
Click OK and refresh the page. If the status of the database changes from Running to Being Stored in Cold Storage, the database is being converted into a cold storage database.
Step 2: Convert a cold storage database into an online database
Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
In the left-side navigation pane, click Databases.
Find the required database. Then, click More and select Convert Cold Storage Database to Online Database in the Actions column of the database.
Click OK and refresh the page. The cold storage database is being converted into an online database.
References
For more information about how to use an API operation for the conversion between an online database and a cold storage database, see ModifyDatabaseConfig.
For more information about the storage types that are supported by ApsaraDB RDS for SQL Server, see Storage types.