All Products
Search
Document Center

Elastic Compute Service:Use Cloud Assistant to upload a file that does not exceed 24 KB in size to ECS instances

更新時間:Jul 12, 2024

This topic describes how to use Cloud Assistant to upload a file that does not exceed 24 KB in size, such as a configuration file or script, to one or more 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.

    Important

    To upload a file whose size is larger than 24 KB, use other methods. For more information, see Upload or download files.

Procedure

  1. Log on to the ECS console.

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

  3. In the top navigation bar, select the region and resource group to which the resource belongs. 地域

  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 prompted.

    • 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

      You can also click Send File in the upper-right corner of the ECS Cloud Assistant page to send a file to multiple instances.

  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 run 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 stops 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 result of the file sending task on the File Sending Result tab.

View the execution result 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 Sending Result 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.

Related API operations

  • SendFile: uses Cloud Assistant to send an on-premises file to one or more ECS instances.

  • DescribeSendFileResults: queries files sent by Cloud Assistant and the sending states.