All Products
Search
Document Center

Upload files to ECS instances

Last Updated: May 19, 2022

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

Prerequisites

  • The ECS instances are in the Running (Running) state.

  • The Cloud Assistant client is installed on the instances. For more information, see Install the Cloud Assistant client.

  • You can call an API operation to send a file to a maximum of 50 instances at a time.

  • The file that you want to upload cannot exceed 32 KB in size after it is encoded in Base64.

Background information

You can use the Cloud Assistant client to upload files that cannot exceed 32 KB in size. If you want to upload files that are larger than 32 KB in size or if you want to download files from ECS instances, we recommend that you use the FileZilla tool by using the SSH File Transfer Protocol (SFTP).

Procedure

  1. Log on to the ECS console.

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

  3. In the top navigation bar, select a region.

  4. On the Cloud Assistant page, click Send File.

  5. In the Command Information section, configure the parameters described in the following table.

    Parameter

    Description

    Destination System

    Select the operating system of the ECS instances. Valid values:

    • Linux

    • Windows

    Upload File

    Select a method to use to upload the file. Valid values:

    • Upload File: You can click Upload File to select a file or drag a file to the Upload File section.

    • Paste File Content: You can paste the file content to the field.

    Note

    The file that you want to upload cannot exceed 32 KB in size after it is encoded in Base64.

    File Name

    Specify a name for the file.

    Note

    If you turn off Overwrite, make sure that the file name is unique within the destination path of the ECS instance.

    Destination Path

    Specify the destination path to save the file.

    • Default value when Destination System is set to Linux: /root

    • Default value when Destination System is set to Windows: C:/Users/Administrator/Documents

    File Description

    Enter the description of the file.

    Users

    Specify the user to which the file belongs.

    This parameter is required only for Linux instances.

    User Group

    Specify the user group to which the file belongs.

    This parameter is required only for Linux instances.

    Permission

    Set the permissions on the file.

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

    This parameter is required only for Linux instances.

    Overwrite

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

    Timeout Period

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

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

  6. In the Select Instances section, select one or more instances.

  7. Click Create Task.

  8. In the panel that appears, view the execution results of the file sending task.

    File sent

View file sending results

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

  2. On the 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 corresponding 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 this task again.

References