PowerProtect Backup Services:備份前和備份後指令碼無法執行
Summary: 本知識文章說明備份前和備份後指令檔無法在備份期間執行的問題。
This article applies to
This article does not apply to
This article is not tied to any specific product.
Not all product versions are identified in this article.
Symptoms
備份前和備份後指令檔已就位。但是,執行不會運行。
工作記錄中會顯示下列錯誤:
level=info ts=2023-05-11T13:19:54.933937279+10:00 filename=prepost_script.go:114 message="Running Script : /<path>/pre_script.sh for request_id : 46"
level=error ts=2023-05-11T13:19:54.934454653+10:00 filename=prepost_script.go:130 message="Exception encountered in executing the script"
level=error ts=2023-05-11T13:19:54.934499706+10:00 stack="fork/exec /<path>/pre_script.sh: exec format error\\ngoroutine 1 [running]:\nruntime/debug.Stack()\n\t/usr/local/go/src/runtime/debug/stack.go:24 +0x65\nphoenix/pkg/client/logutil.Error({0xcee3c0, 0xc0002643f0}, {0xc3e9b6, 0x1}, {0x0, 0x8, 0x8})\n\t/bld/src/phoenix/pkg/client/logutil/logger.go:86 +0x211\nphoenix/fileserver/client/agent/backupagent.(*BackupAgent).scriptRunner(0xc0000cb560, {0xc00026a138, 0x18}, 0x258, 0x1, {0xc2504c, 0xa})\n\t/bld/src/phoenix/fileserver/client/agent/backupagent/prepost_script.go:130 +0x815\nphoenix/fileserver/client/agent/backupagent.(*BackupAgent).runScript(0xc0000cb560, {0xc2504c, 0xa})\n\t/bld/src/phoenix/fileserver/client/agent/backupagent/prepost_script.go:89 +0x212\nphoenix/fileserver/client/agent/backupagent.(*BackupAgent).runPreScript(0xc0000cb560)\n\t/bld/src/phoenix/fileserver/client/agent/backupagent/prepost_script.go:23 +0x98\nphoenix/fileserver/client/agent/backupagent.(*BackupAgent).DoBackup(0xc0000cb560, 0x20)\n\t/bld/src/phoenix/fileserver/client/agent/backupagent/backup_agent.go:158 +0x352\nmain.backupMain({0xc0000a2160, 0x2, 0x1}, 0x0)\n\t/bld/src/phoenix/fileserver/client/cmd/PhoenixFSBackupAgent/main.go:174 +0x9b7\nmain.main()\n\t/bld/src/phoenix/fileserver/client/cmd/PhoenixFSBackupAgent/main.go:203 +0xa8\n"
level=info ts=2023-05-11T13:19:54.934512521+10:00 filename=backup_agent.go:966 message="Sending log to Phoenix server with message: Pre-Script error encountered : fork/exec /<path>/pre_script.sh: exec format error"
level=info ts=2023-05-11T13:19:55.180236915+10:00 filename=prepost_script.go:90 message="Script execution done with status : Failed"Cause
產品正在依設計運作。
Resolution
在觀察到此問題的一個實例中,#!/bin/bash 不在pre_script.sh和post_script.sh中。
將 #!/bin/bash 添加到pre_script.sh和post_script.sh的第一行后,它工作正常。
Affected Products
PowerProtect Backup ServicesArticle Properties
Article Number: 000213826
Article Type: Solution
Last Modified: 22 Aug 2025
Version: 3
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.