Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Object Storage Migration Service/ User Guide/ Synchronization Tasks/ Configuring the Source Storage Service to Send Synchronization Requests

Configuring the Source Storage Service to Send Synchronization Requests

Updated on 2024-12-19 GMT+08:00

Scenarios

After you create a synchronization task, you need to configure the source object storage service to request OMS to migrate newly added and modified source objects. To do so, you can use a message notification or function service on the source platform.

Desired Effects

  • The names of newly added and modified objects in the source bucket can be obtained in real time.
  • The OMS synchronization API can be invoked to migrate the newly added and modified objects to the destination bucket.

Configuration Methods

  • Using the source object storage service and the function service
    NOTE:

    On the source platform, you need to create a function and configure an event trigger for synchronizing incremental source objects through OMS.

    When objects are added to or modified in the source bucket, the source object storage service will call the configured function to trigger migration of these objects to the destination bucket.

  • Using a service system and a message notification service
    NOTE:

    When objects are added or modified in the source bucket, the service system captures the information about these objects through the messages received from the source object storage service or by proactively analyzing database changes. Then the system invokes the synchronization API of OMS to migrate the newly added and modified objects from the source bucket to the destination bucket.

Procedure

The following takes Huawei Cloud as the source platform and describes how to use FunctionGraph to send synchronization requests.

CAUTION:

The created function must be in the same region as the source bucket.

  1. Sign in to the console.
  2. Click Service List and choose Compute > FunctionGraph.

    The FunctionGraph console is displayed.

  3. In the navigation pane on the left, choose Templates.
  4. In the search box on the displayed page, enter OMS and locate the Data synchronization template, as shown in Figure 1.

    Figure 1 OMS data synchronization template
    NOTE:

    Click View details to view the template details, such as template type, input parameters, output parameters, and precautions.

  5. Click Configure.
  6. Set parameters in the Basic Information area by referring to Table 1.

    Figure 2 Setting basic parameters
    Table 1 Basic parameters for creating a function

    Parameter

    Description

    Template

    Retain sync-oms-data.

    Region

    Select the region where the source bucket is located.

    Project

    Select a project in the selected region.

    Function Name

    Specify a function name. The name must:

    • Consist of 1 character to 60 characters, allowing letters, digits, hyphens (-), and underscores (_).

    • Start with a letter and end with a letter or digit.

    Enterprise Project

    Set this parameter as needed. The value defaults to default.

    Agency

    Select Use no agency.

    Runtime

    The value defaults to Python 3.6 and cannot be modified.

    Create trigger

    Select Object Storage Service (OBS).

  7. Set parameters in the Environment Variables area by referring to Table 2.

    Figure 3 Setting environment variables
    Table 2 Environment variables

    Parameter

    Description

    sync_url

    Enter the address for receiving synchronization requests. It can be obtained from the synchronization task details.

    sync_task_id

    Enter the synchronization task ID, which can be obtained from the synchronization task list.

    log_bucket

    Enter the name of the bucket used for storing the function execution logs. Here also stores the lists of objects for which synchronization requests are sent or fail to be sent to OMS.

    CAUTION:

    The log bucket must be in the account used to create the synchronization task.

    obs_endpoint

    Enter the OBS domain name in the region where the log bucket is located. For details about regions and endpoints, see Regions and Endpoints.

    hw_ak

    Enter the AK of the account used to create the synchronization task.

    hw_sk

    Enter the SK of the account used to create the synchronization task.

  8. Set trigger parameters. For details about the parameters, see Table 3.

    Figure 4 Creating a trigger
    Table 3 Parameters required for creating a trigger

    Parameter

    Description

    Trigger Type

    Object Storage Service (OBS)

    Bucket Name

    Select the source bucket that stores the data to be synchronized.

    Events

    Set this parameter based on your requirements.

    (Optional) Event Notification Name

    An event name is automatically generated. You can specify a name as needed.

    (Optional) Prefix

    Enter a prefix to limit notifications to objects whose names start with the matching characters.

    (Optional) Suffix

    Enter a suffix to limit notifications to objects whose names end with the matching characters.

  9. Click Create Function.

    The function details page is displayed.

  10. Click the Configuration tab. On the Basic Settings page, set Execution Timeout (s) to 60 and click Save.

    Figure 5 Setting the execution timeout interval

  11. Click OK.

    NOTICE:

    You need to configure a test event to verify the function.

  12. Click the Code tab and select Configure Test Event from the drop-down list in the Code Source area. The Configure Test Event dialog box is displayed, as shown in Figure 6. Set the parameters listed in Table 4.

    Figure 6 Configuring a test event
    Table 4 Parameters required for configuring a test event

    Parameter

    Description

    Configure Test Event

    Use the default option Create new test event.

    Event Template

    Select obs-event-template in the event template list.

    Event Name

    An event name is automatically generated. You can specify a name as needed.

  13. Click Create.
  14. Click Test. The test result is displayed on the right of the page.

    Figure 7 Viewing the test result
    NOTE:

    After the test succeeds, upload an object to the source bucket. Wait for 10 minutes. Then the object will be synchronized to the destination bucket.

Obtaining Object Lists

Object List

Path

List of requested objects

oms_source_record/success_object

List of unrequested objects

oms_source_record/failed_object/

NOTE:

The objects in the lists are those to be synchronized.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback