A team executes a full cloud migration by uploading on-premises database backups to OSS, importing into RDS, syncing to Elasticsearch for full-text search, and then using RDS data migration to replicate across regions or instance types for high availability and disaster recovery.
Use this workflow when modernizing an on-premises database to a cloud-native architecture that requires full-text search and cross-region disaster recovery. The pipeline stages backups in OSS, ingests them into RDS as the primary transactional layer, syncs data to Elasticsearch for low-latency analytics, and establishes a replicated RDS instance for high availability.
ossutil cp /path/to/backup.sql.gz oss://<bucket-name>/db-staging/ --storage-class Standard.aliyun rds ImportDataFromOSS --DBInstanceId <rds-id> --FileName db-staging/backup.sql.gz --Engine MySQL --OSSBucket <bucket-name>. Poll DescribeImportDataFromOSSStatus until Status=Success.aliyun dts CreateSynchronizationJob --JobName rds-to-es-sync --SourceEndpointEngineName MySQL --DestEndpointEngineName Elasticsearch --SynchronizationDirection Forward --TableMapping '{"source":"db.","dest":"es-index-"}'.aliyun rds CreateDBInstance --Engine MySQL --EngineVersion 8.0 --RegionId <target-region> --VPCId <vpc-id> --DBInstanceClass rds.mysql.s2.large.aliyun dts CreateSynchronizationJob --JobName rds-dr-sync --SourceRegion <src> --DestRegion <target> --SourceEndpointInstanceID <primary-id> --DestEndpointInstanceID <replica-id> --SynchronizationMode Incremental.SELECT COUNT(*) on both RDS instances and _cat/indices?v on ES. Update application configs to route search queries to the ES endpoint and read-heavy workloads to the replica.Data flows unidirectionally from on-premises to OSS as a durable staging layer. RDS acts as the primary ingestion and transactional engine. From RDS, data bifurcates: one stream replicates incrementally to Elasticsearch for full-text indexing, while a second stream asynchronously syncs to a cross-region RDS instance for disaster recovery and read scaling.
AliyunOSSFullAccess, AliyunRDSFullAccess, and AliyunDTSFullAccess attached..sql or .sql.gz format, validated against target RDS engine version.latin1 RDS instances breaks multibyte data. Always enforce --default-character-set=utf8mb4 during import.split -b 4G backup.sql before uploading.DATETIME or JSON columns triggers strict mapping errors. Define explicit ES index mappings before starting DTS.DtsLag metrics and delay application cutover until Lag < 5s.Q: How do I migrate an on-premises database to the cloud with search and replication? A: You can execute this workflow by uploading on-premises database backups to OSS, importing them into RDS, and syncing the data to Elasticsearch for full-text search. You then use RDS data migration to replicate the database across regions or instance types to ensure high availability and disaster recovery.