#183 Acronis Cyber​​ Backup:如何收集调试日志(Linux)

iconRemoved User在 2020-6-5 下午12:29 编写 ( iconRemoved User在 2020-6-5 下午2:18 更新 <历史> )
  编辑(登录)
  收藏
  响应调查   响应调查

  主题

介绍

本文介绍了启用调试日志记录的新方法。在极少数情况下需要调试日志,并且只有在 Acronis 支持明确要求这样做时才收集调试日志(通常是在基于现有错误无法发现警告或错误的根本原因时)。默认情况下,请勿启用调试日,它会迅速填满磁盘的可用空间。

步骤1:查找组件的配置文件

日志由配置文件控制,这些文件位于相应二进制文件的文件夹中:

  • Acronis Managed Machine service: /usr/lib/Acronis/BackupAndRecovery/mms.config
  • service process: /usr/lib/Acronis/BackupAndRecovery/service_process.config
  • Acronis Management Server: /usr/lib/Acronis/AMS/abr_ams.config
  • /usr/lib/Acronis/AMS/virtual_center_addon.config
  • Service Manager: /usr/lib/Acronis/ServiceManager/asm.config
  • Acronis Removable Storage Management Service: /usr/lib/Acronis/ARSM/arsm.config
  • Zmq Gateway: /usr/lib/Acronis/ZmqGw/zmqgw.config

步骤2:更改配置文件

  1. 在编辑器中打开配置文件,例如 nano:
    nano <path_to_the_file>.config
    
  2. 搜索 <logging>标记:
    clip-20200605112201.png
  3. 找到您要启用调试日志的通道:
    Acronis Managed Machine Service /usr/lib/Acronis/BackupAndRecovery/
    mms.config
    <channel id="mms"...>  
    <channel id="alerts"...>
    <channel id="archive-manager"...>
    <channel id="astorage-client"...>
    <channel id="disk-manager"...>
    <channel id="backup-api"...>
    <channel id="dms"...>
    <channel id="protection_engine"...>
    <channel id="recovery-assistant"...>
    <channel id="zmq_client_connections"...> debug by default
    <channel id="zmq_client_sessions"...> debug by default
    <channel id="http"...>
    <channel id="account_server_client"...>
    <channel id="enforcement"...>
    <channel id="pcs"...>
    <channel id="perf-stat-init"...>
    <channel id="perf-stat-runtime" ...>
    <channel id="task_execution"...>
    <channel id="rest_api"...>
    <channel id="active_protection"...>
    
    service process usr/lib/Acronis/BackupAndRecovery/
    service_process.config
    <setlevel id="service_process"...>
    
    Acronis Management Server /usr/lib/Acronis/AMS/
    abr_ams.config
    <channel id="active_protection"...>
    <channel id="activity-stream"...> debug by default
    <channel id="agent-migration"...>
    <channel id="alerts"...>
    <channel id="ams"...>
    <channel id="async-ipc"...>
    <channel id="backup-assistant"...>
    <channel id="client-activity"...>
    <channel id="con"...>
    <channel id="curl"...>
    <channel id="dml_core"...>
    <channel id="dml_dispatcher_perf"...>
    <channel id="dms"...>
    <channel id="email_service"...>
    <channel id="enforcement"...>
    <channel id="http"...>
    <channel id="perf-stat-init"...>
    <channel id="perf-stat-runtime"...>
    <channel id="protection_engine"...>
    <channel id="recovery-assistant"...>
    <channel id="registry-access"...>
    <channel id="session-manager"...> debug by default
    <channel id="server_dispatcher_perf"...>
    <channel id="settings"...>
    <channel id="tenancy_resolver"...>
    <channel id="sync_replication"...> debug by default
    <channel id="update_provider"...> debug by default
    <channel id="rest_api"...>
    
    virtual_center_addon.config
    <channel id="balancing_addon"...>
    <channel id="balancing_addon_extra"...> debug by default
    <channel id="instance_merger_extra"...> debug by default
    <channel id="task_execution">
    
    Service Manager /usr/lib/Acronis/ServiceManager/asm.config
    asm.config
    "log_level"
    
    Acronis Removable Storage Management Service /usr/lib/Acronis/ARSM/arsm.config/
    arsm.config
    <channel id="arsm"...>
    <channel id="tape_hotplug"...>
    <channel id="tape_select"...>
    <channel id="tape_scsi"...> debug by default
    <channel id="tape_db"...> debug by default
    <channel id="session-manager"...>
    <channel id="con"...>
    
    Zmq Gateway /usr/lib/Acronis/ZmqGw/zmqgw.config/
    zmqgw.config
    <channel id="settings"...>
    <channel id="zmqgw"...> debug by default
    
  4. level ="info" 的值从" info" 更改为 "debug":
    clip-20200605112441.png
  5. 保存更改并关闭文件:
    Ctrl + O 并按Enter : 保存文件
    Ctrl + X : 退出
  6. 通过运行适当的命令来重新启动相应的服务:
    • 更改了 ams.config 后 -> service acronis_ams restart
    • 更改了 arsm.config 后 -> service acronis_rsm restart
    • 更改了 mms.config 后 -> service acronis_mms restart
    • 更改了 asm.config 后 -> service acronis_asm restart
    • 更改了 zmqgw.config 后 -> service acronis_zmqgw restart

步骤3:重现问题并收集日志

启用调试日志记录后,请重现该问题。

日志中包含进程 ID 和进程开始时间。

现在,您可以检查日志以调查问题的根本原因或收集 Acronis 系统信息。

日志位于:

  • Acronis Management Server log: /var/lib/Acronis/AMS/logs
  • Acronis Management Console log: /var/lib/Acronis/BackupAndRecoveryConsole/logs
  • Acronis Removable Storage Management service log: /var/lib/Acronis/ARSM/logs
  • Service process log: /var/lib/Acronis/ServiceProcess/logs

步骤4:禁用调试日志记录

  1. 在编辑器(例如nano)中打开配置文件。
  2. 搜索 <logging>标记。
  3. level ="debug" 的值从 "debug" 更改为 "info"。
  4. 保存更改并关闭文件。
  5. 重新启动相应的服务。

更多信息

您可以在配置文件中更改的其他参数:

folder="" 是放置日志的文件夹。例如,如果将其设置为 folder="/tmp",则日志将生成到 /tmp。
level="{error|warning|info|debug}" 是日志记录级别。级别低于此处指定的所有日志都不会写入日志。例如,如果设置为“ info”,则除调试日志外的所有日志都将写入日志(默认值)。如果设置为 "warning",,则仅将警告和错误消息写入日志。
enabled="{true|false}" 启用或禁用此日志。
maxfiles=""设置日志文件的最大数量。如果日志数超过了maxfiles数,则将删除较旧的日志。
maxage="" 设置日志文件的最长期限(以小时为单位)。如果您的日志超过了最大容量,则将删除较旧的日志。

原文链接:https://kb.acronis.com/content/62375


 添加评论