All Products
Search
Document Center

Elastic Compute Service:Upload on-premises files to ECS instances

Last Updated:Dec 08, 2023

This topic describes how to use Cloud Assistant Agent to upload files such as configuration files and scripts to Elastic Compute Service (ECS) instances.

Prerequisites

  • The ECS instances to which you want to upload a file are in the Running (Running) state.

  • The file cannot exceed 24 KB in size.

    To upload a file whose size is larger than 24 KB, use other methods. For more information, see Upload a file from on-premises to an ECS instance.

Procedure

  1. Log on to the ECS console.

  2. In the left-side navigation pane, choose Maintenance & Monitoring > Cloud Assistant.

  3. In the upper-left corner of the top navigation bar, select a region. 地域

  4. In the instance list of the ECS Instances tab, find the instance to which you want to upload a file and click Send File in the Actions column.

    • If Not Installed is displayed in the Cloud Assistant Status column, install Cloud Assistant Agent on the instance as instructed.

    • If Abnormal is displayed in the Cloud Assistant Status column, restart Cloud Assistant Agent. If the Cloud Assistant Agent version is earlier than 1.0.2.569 on a Linux instance or 1.0.0.149 on a Windows instance, manually install a later version of Cloud Assistant Agent. For more information, see Start, stop, or uninstall Cloud Assistant Agent or Install Cloud Assistant Agent.

      Note

      Alternatively, in the upper-right corner of the ECS Cloud Assistant page, you can click Send File to send a file to multiple instances simultaneously.

  5. In the Send File panel, configure parameters based on your business requirements in the Command Information section. Then, click Run.

    Parameter

    Description

    File

    Required. Select an upload method and follow the on-screen instructions to upload the file.

    File Name

    Required. Specify a name for the file.

    Important

    If you turn off Overwrite, the name must be unique across the destination path of the ECS instances.

    Destination Path

    Required. Specify an existing absolute path on the ECS instances to save the file. Default values:

    • Default value for Linux instances: /root

    • Default value for Windows instances: C:\Users\Administrator\Documents

    File Description

    Specify a description for the file for easy identification.

    User

    Specify the user to which the file belongs.

    Note

    The parameter is valid only for Linux instances.

    User Group

    Specify the user group to which the file belongs.

    Note

    The parameter is valid only for Linux instances.

    Permission

    Configure permissions on the file. You can configure this parameter in the same manner as you configure the chmod command.

    Default value: 0644. The value indicates that the file owner has the read and write permissions on the file, and that other users in the same user group as the file owner and public users only have the read permissions on the file.

    Note

    The parameter is valid only for Linux instances.

    Overwrite

    Specify whether to overwrite the file that has the same name as the uploaded file in the destination path.

    By default, Overwrite is turned off.

    Timeout

    Set the timeout period for the file sending task. When the file sending task times out, Cloud Assistant forcefully terminates the task process.

    Unit: seconds. Valid values: 10 to 86400. Default value: 60.

    Tag

    Specify a tag that you want to add to the file sending task for subsequent classification and management. Tag Key: the key of the tag. Tag Value: the value of the tag.

    View the results of the file sending task on the File Sending Results tab.

View the execution results of a file sending task

  1. In the left-side navigation pane, choose Maintenance & Monitoring > Cloud Assistant.

  2. On the ECS Cloud Assistant page, click the File Send Results tab.

  3. In the task list, view the execution states, execution IDs, and destination paths of file sending tasks.

    You can perform the following operations in the Actions column that corresponds to a file sending task:

    • Click View to view the execution results of the task on each instance.

    • Click Export to export the task execution results.

    • Click Send Again to execute the task again.

References