This topic describes how to use the file sending feature to upload local files such as configuration files and scripts to ECS instances.
Prerequisites
The ECS instances are in the Running (Running) state.
The Cloud Assistant client is installed on the ECS instances. For more information, see Install the Cloud Assistant client.
You can send a file to a maximum of 50 ECS instances in a single API call.
The file to send is no larger than 32 KB in size after it is encoded in Base64.
Procedure
Log on to the ECS console.
In the left-side navigation pane, choose Maintenance & Monitoring > ECS Cloud Assistant.
In the top navigation bar, select a region.
Click Send File.
In the Command Information section, configure the following parameters.
Parameter
Description
Destination System
The operating system of the ECS instance. Valid values:
Linux
Windows
Upload File
The method used to upload the file. Valid values:
Upload File: You can click the upload section and select a file, or drag a file to the upload section.
Paste File Content: You can paste the file content to the field.
NoteThe file cannot exceed 32 KB in size after it is encoded in Base64.
File Name
The name of the file.
NoteIf you turn off Overwrite, make sure that the file name is unique within the destination path on the ECS instance.
Destination Path
The 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
The description of the file.
User
The user to which the file belongs.
This parameter is required only for Linux instances.
User Group
The user group to which the file belongs.
This parameter is required only for Linux instances.
Permission
The permissions on the file.
Default value:
0644
. This value indicates that the file owner has the read and write permissions on the file, and other users in the same user group as the file owner and public users have the read permission on the file.This parameter is required only for Linux instances.
Overwrite
Specifies whether to overwrite the file that has the same name as the sent file in the destination path.
Timeout Period
The timeout period of the file sending task. When the file sending task times out, Cloud Assistant forcibly stops the task process.
Valid values: 10 to 86400. Unit: seconds. Default value: 60.
In the Select Instances section, select one or more instances.
Click Create Task.
In the panel that appears, view the execution result of the file sending task.
View file sending results
In the left-side navigation pane, choose Maintenance & Monitoring > ECS Cloud Assistant.
Click the File Sending Result tab.
In the task list, view the execution status, execution ID, and destination path of the task.
You can also click buttons in the Actions column to perform the following operations:
Click View to view the task execution result on each ECS instance.
Click Export to export the task execution results.
Click Send Again to execute this task again.