Enable automatic saving for Cloud Assistant commands on instances

更新时间:
复制 MD 格式

Since Cloud Assistant Agent 2.x.3.704, commands are no longer saved to disk by default. Enable automatic saving to retain scripts for auditing or troubleshooting.

Procedure

Run the commands for your operating system.

Linux / FreeBSD instances

Run these commands on your instance.

  1. Set the configuration item

    aliyun-service configure set --item task.keepScriptFile=enabled
  2. Reload the configuration

    aliyun-service configure reload

Windows instances

Open PowerShell as an administrator and run these commands.

Note: Replace {version} with the actual Cloud Assistant Agent version number. See View the Cloud Assistant Agent information for an ECS instance.

  1. Set the configuration item

    C:\ProgramData\aliyun\assist\{version}\aliyun_assist_service.exe configure set --item task.keepScriptFile=enabled
  2. Reload the configuration

    C:\ProgramData\aliyun\assist\{version}\aliyun_assist_service.exe configure reload

View saved scripts

Cloud Assistant saves command scripts to the following paths:

  • Linux: /usr/local/share/aliyun-assist/work/script/

  • CoreOS: /opt/local/share/aliyun-assist/work/script/

  • Windows: C:\ProgramData\aliyun\assist\work\script\