メイン コンテンツに進む
  • すばやく簡単にご注文が可能
  • 注文内容の表示、配送状況をトラック
  • 会員限定の特典や割引のご利用
  • 製品リストの作成とアクセスが可能

網路復原:Windows NetWorker Server 在存放庫中的應用程式復原失敗,並出現錯誤「cp:保留「/etc/hosts_nw_recovery_123456」的許可權:拒絕的許可權」

概要: 網路復原:Windows NetWorker Server 應用程式復原在存放庫中失敗,並出現錯誤「Failed to run:「cp -p /etc/hosts /etc/hosts_nw_recovery_123456」err:使用狀態 1 stderr 結束的程式:cp:保留「/etc/hosts_nw_recovery_123456」的許可權:許可權遭拒'

この記事は次に適用されます:   この記事は次には適用されません: 

現象

在 Windows 上執行之 NetWorker 伺服器的應用程式復原失敗,並在 Cyber Recovery 的「apps.log」中出現此錯誤堆疊。
 
[2022-10-12 11:48:03.879] [INFO] [apps] [RecoverNetWorkerApp.go:142 RunNWWorkflow()] : Current Task Number: 1
[2022-10-12 11:48:03.879] [INFO] [apps] [RecoverNetWorkerApp.go:144 RunNWWorkflow()] : Task Name: 10- About NetWorker
[2022-10-12 11:48:03.879] [INFO] [apps] [restapi_client.go:256 CallRESTAPI()] : Methods is :GET URL is:https://10.10.10.10:9090/nwrestapi
[2022-10-12 11:48:03.916] [INFO] [apps] [RecoverNetWorkerApp.go:223 NWAbout()] : Gathering information about Networker host: 10.10.10.10
[2022-10-12 11:48:03.917] [INFO] [apps] [RecoverNetWorkerApp.go:234 NWAbout()] : NW Version: 19.5.0.2.Build.123
[2022-10-12 11:48:03.917] [INFO] [apps] [RecoverNetWorkerApp.go:251 NWAbout()] : Networker Rest API URI: https://10.10.10.10:9090/nwrestapi/v2
[2022-10-12 11:48:03.941] [INFO] [apps] [restauth.go:68 func1()] : GET /irapi/v6/apps/6345b72b9a6dd20001dc9eae Start GetAppByID
[2022-10-12 11:48:03.943] [INFO] [apps] [restauth.go:102 func1()] : GET /irapi/v6/apps/6345b72b9a6dd20001dc9eae End GetAppByID Elapsed=1.208648ms
[2022-10-12 11:48:03.947] [INFO] [apps] [RecoverNetWorkerApp.go:142 RunNWWorkflow()] : Current Task Number: 2
[2022-10-12 11:48:03.947] [INFO] [apps] [RecoverNetWorkerApp.go:144 RunNWWorkflow()] : Task Name: 12- Before Networker Recovery
[2022-10-12 11:48:03.973] [INFO] [apps] [ddssh.go:693 CreateSSHClientConn()] : Establish SSH connection using credential
[2022-10-12 11:48:03.973] [INFO] [apps] [ddssh.go:716 CreateSSHClientConn()] : SSH connecting to 10.10.10.10:22 
[2022-10-12 11:48:04.168] [INFO] [apps] [ddssh.go:317 RunSSHCmd()] : Running: 10.10.10.10:22 cp -p /etc/hosts /etc/hosts_nw_recovery_1234561665568083
[2022-10-12 11:48:04.379] [ERROR] [apps] [ddssh.go:322 RunSSHCmd()] : Failed to run: 'cp -p /etc/hosts /etc/hosts_nw_recovery_1234561665568083' err: Process exited with status 1 stderr: cp: preserving permissions for '/etc/hosts_nw_recovery_1234561665568083': Permission denied
[2022-10-12 11:48:04.379] [ERROR] [apps] [appsUtils.go:147 BackupHostFile()] : Process exited with status 1 stderr: cp: preserving permissions for '/etc/hosts_nw_recovery_1234561665568083': Permission denied
 cp: preserving permissions for '/etc/hosts_nw_recovery_1234561665568083': Permission denied
[2022-10-12 11:48:04.379] [ERROR] [apps] [RecoverNetWorkerApp.go:294 NWPreRecovery()] : Unable to create backup copy of /etc/hosts on 10.10.10.10

Cygwin 是根據 Cyber Recovery 安裝指南中提到的指示,在 Windows 型 NetWorker 伺服器上正確安裝和設定。

原因

如果 Cygwin 安裝在標準 Windows 伺服器上,則手動執行相同的「cp -p /etc/hosts /etc/hosts_rec_123456」命令時,會發現相同的問題。
Administrator@vm2836 ~
$ cp -p /etc/hosts /etc/hosts_nw_rec_1234
cp: preserving permissions for ‘/etc/hosts_nw_rec_1234’: Permission denied

Administrator@vm2836 ~
$ file /etc/hosts
/etc/hosts: symbolic link to /proc/cygdrive/c/Windows/System32/drivers/etc/hosts

Administrator@vm2836 ~
$ cp -p /proc/cygdrive/c/Windows/System32/drivers/etc/hosts /etc/hosts_rec_12345678
cp: preserving permissions for ‘/etc/hosts_rec_12345678’: Permission denied

唯一有效的是,從「cp」命令中省略「-p」選項,這個命令運作正常。「-p」選項可用來保留副本期間的檔案特性。
Administrator@vm2836 ~
$ cp /etc/hosts /etc/hosts_nw_rec_1234

Cyber Recovery 在執行 NetWorker 應用程式復原時有兩個程式碼路徑,一個用於 Linux 型伺服器,一個用於 Windows 型伺服器。在這種情況下,執行復原時,會顯示應用程式類型是 Linux 而非 Windows。  新增 NetWorker 應用程式時,未取得將應用程式類型設定為 Windows 的正確資訊,而是設定為 Linux,這也是備份 /etc/host 檔案時使用 cp -p 的原因。在 Window 的程式碼路徑中,不會使用「-p」選項。

解決方法

解決方案是刪除現有的 NetWorker 應用程式,並再次正確新增,讓作業系統類型顯示為 Windows 而非 Linux。

対象製品

PowerProtect Cyber Recovery, NetWorker

製品

Cyber Recovery Series