Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Enjoy members-only rewards and discounts
  • Create and access a list of your products

NetWorker (Linux):如何將檔案複製到/從 Linux NetWorker 伺服器。

Summary: 此 KB 是一般 KB,可協助您選擇在 Linux NetWorker 伺服器上/關閉檔案;包括 NetWorker Virtual Edition (NVE) 應用裝置。此知識庫文章包含使用 SCP、NetWorker FLR、NFS、SMB、可掛載 ISO 檔案和 VMware PowerCLI 的基本指示。

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.

Instructions

在某些情況下,工程/支援可能會提供/要求需要從 NetWorker 系統收集/放置的檔案;在某些問題/組態下,可能無法選擇將檔案複製到/從 NetWorker 系統複製的某些選項。此 KB 是一般 KB,可協助您選擇在 Linux NetWorker 伺服器上/關閉檔案;包括 NetWorker Virtual Edition (NVE) 應用裝置。
 

安全複製通訊協定 (SCP):

其中一種簡單的方法是使用 SCP 代理程式 (WinSCPFileZilla此超連結會帶您前往 Dell Technologies 以外的網站。 )。您可以安裝這些 Windows 公用程式,並使用 SSH/SCP 連線至 Linux NetWorker 伺服器來複製檔案。此方法使用從 SCP 代理程式連線至 Linux 系統時,指定使用者帳戶的 Linux 使用者許可權。此方法需要在 NetWorker 伺服器上執行 sshd 服務。

注意:部分 Linux 系統在 /etc/ssh/sshd_config 檔案中設定了「PermitRootLogin no」,這會使用具有「拒絕存取」的根帳號來失敗 SSH/SCP 連線。
 

NetWorker 檔案層級復原 (FLR):

如果無法透過 SSH 存取 NetWorker 伺服器,您可以為 NetWorker 伺服器建立 NetWorker 用戶端,因為儲存集會指定您需要複製的檔案。執行新建立用戶端的備份;接著,將檔案的 FLR 執行到 SSH 運作中不同的目標 Linux 系統。檔案可以是來自目標系統的 SCP,或者從 CIFS 共用複製到 Windows 系統 (若已設定)。此方法也可用於 NetWorker 伺服器上所需的 FLR 檔案,方法是將其備份在遠端 Linux 用戶端上,然後將 FLR 執行到 NetWorker 伺服器。

注意:此方法亦可使用 NVP vProxy;而不是建立用戶端,只需將 NetWorker 伺服器備份為 VM,然後執行 VM 儲存集的 FLR 至替代目標。
 
如需設定用戶端和執行 FLR 的相關資訊,請參閱《NetWorker 管理指南》《NetWorker VMware Integration Guides》,這些指南可透過HTTPs://www.dell.com/support/home/
 

網路檔案共用 (NFS)

視特定 Linux 分散式裝置安裝 NFS 而定,NFS此超連結會帶您前往 Dell Technologies 以外的網站。 可能會有所不同。這僅應由終端使用者執行;本知識庫僅提供基本 NFS 指示,如需其他資訊,請參閱 Linux 作業系統的 NFS 指示。NFS 可讓您在兩個 Linux 系統之間複製檔案。

若要確認系統是否正在執行 NFS,系統會從以下專案複製檔案:  

rpcinfo -p |grep nfs

   
輸出應顯示:

100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100227 3 tcp 2049 nfs_acl

如果 NFS 正在執行,請執行下列步驟:

1.建立掛接點:sudo mkdir /mnt/nfsshare
2.使用 Linux cp 命令,將所需的檔案放在 /mnt/nfsshare 目錄中。
3.變更掛接點的擁有者:sudo chown -R 無名:/mnt/nfsshare
3.在掛接點上設定許可權:sudo chmod -R 777 /mnt/nfsshare
4.修改 /etc/exports 檔案以包含掛接點和存取訊號:

語法:/mnt/nfsshare NETWORK-IP-ADDRESS/NETMASK (rw、sync、no_all_squash、root_squash)
範例: 

[root@CentOS8 ~]# cat /etc/exports
/mnt/nfsshare 192.168.25.0/24(rw,sync,no_all_squash,root_squash)

5.匯出共用:sudo exportfs -arv
您可以顯示以下共用:sudo exportfs -s

NFS 用戶端系統 確認您可以透過埠 2049 連線到 NFS 伺服器

curl -v NFS-SERVER-NAME:2049

[root@RedHat8 ~]# curl -v centos8:2049
* Rebuilt URL to: centos8:2049/
*   Trying 192.168.25.5...
* TCP_NODELAY set
* Connected to centos8 (192.168.25.5) port 2049 (#0)
...
Removed for brevity

如果連線逾時或遭到拒絕,請解決來源/目標 NFS 系統或來源/目標 NFS 系統間的任何防火牆連線問題。

6.在 NFS 用戶端系統上建立掛接點:sudo mkdir /tmp/mnt
7.在用戶端系統上安裝 NFS 掛接點:

sudo 掛接 -t nfs NFS-SERVER-IP:/mnt/nfsshare/ /tmp/mnt

8.現在,應在安裝點下的 NFS 用戶端上看到來自 NFS 伺服器的檔案:ls -l /tmp/mnt

[root@RedHat8 ~]# ls -l /tmp/mnt
total 0
-rwxrwxrwx 1 nobody nobody 0 May 20 10:13 somefile1
-rwxrwxrwx 1 nobody nobody 0 May 20 10:13 somefile2

9.將檔案複製到本機系統:cp /tmp/mnt/*
 

通用網際網路檔案系統 (CIFS)/SMB

如果已在 Linux 系統上安裝 CIFS此超連結會帶您前往 Dell Technologies 以外的網站。 /SMB,您可以在 Windows 系統和 Linux NetWorker 系統之間複製所需的檔案。此組態僅應由終端使用者執行。此知識庫僅提供基本 CIFS/SMB 指示;如需更詳細的指示,請參閱特定 Linux 作業系統的 CIFS/SMB 指示。若要檢查 SMB 是否正在執行,您可以執行:

sudo systemctl 狀態 smb

sudo testparm命令會顯示 SMB 的設定方式,例如:

[root@CentOS8 ~]# testparm
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

# Global parameters
[global]
        dns proxy = No
        map to guest = Bad User
        security = USER
        server string = Samba Server %v
        workgroup = EMCLAB
        idmap config * : backend = tdb


[Share]
        guest ok = Yes
        path = /mnt/samba
        read only = No

顯示的組態檔案可以使用 sudo vi 修改 (這需要重新開機 SMB 服務)。檔案應包含作為工作組的功能變數名稱、Linux NetWorker 伺服器的 netbios 名稱,以及共用目錄的組態參數:

[root@CentOS8 ~]# cat /etc/samba/smb.conf
[global]
workgroup = emclab
server string = Samba Server %v
netbios name = centos8
security = user
map to guest = bad user
dns proxy = no

[Share]
path = /mnt/samba
browseable = yes
writeable = yes
guest ok = yes
read only = no

 

如果 SMB 在 NetWorker 系統上執行,請執行下列步驟:
1。建立 SMB 共用:sudo mkdir /mnt/samba
2.使用 Linux cp 命令將所需的檔案複製到 /mnt/samba dir。
3.變更 samba dir 的擁有權:sudo chown -R 無名:/mnt/samba
4.變更 samba dir 的許可權:sudo chmod -R 777 /mnt/samba
5.重新開機 smb 服務:sudo systemctl 重新開機 smb
6.從 Windows 系統新增網路位置,並指定 Linux NetWorker 伺服器和共用資料夾,例如:

image.png
這會使用 Linux 伺服器 /etc/samba/smb.conf 檔案

7 的 netbios 名稱和 [Share] 名稱。將 Linux 伺服器的檔案連線後,即可複製到 Windows 系統:
image.png
 

可掛載 ISO (唯讀)

如果您需要將檔案複製到 NetWorker 伺服器但沒有 SSH 存取權,您可以建立可掛接的 ISO,其中包含 NetWorker 伺服器上所需的檔案。ISO 的掛接方式可能會因伺服器的後端而有所不同,下列範例會移至 VMware VM NetWorker 伺服器。此方法為「唯讀」,因此只能用來將檔案複製到 NetWorker 伺服器。

1.收集 Linux NetWorker 系統所需的檔案。
2.PowerISO此超連結會帶您前往 Dell Technologies 以外的網站。 等軟體可用來建立檔案中的 ISO 檔案,例如:

image.png

image.png
3.ISO 可上傳至 VMware 資料存放區,然後掛接至 NetWorker 伺服器 VM 的 CD 磁片磁碟機:

image.png
注意:從下拉式選單中選取資料存放區 ISO 檔案、勾選連接方塊,然後流覽至 ISO 上傳的位置。

4.使用 VMware 主控台/Web 用戶端連線連線至 NVE,並以root 身分登入。
5.建立暫時掛接點:mkdir /tmp/mnt
6.將 CD 磁片磁碟機掛載至掛接點:掛載 /dev/cdrom /tmp/mnt
7.將檔案從掛接點複製:cp /mnt/cdrom/* 


VMware PowerCLI

您也可以使用 PowerCLI Cmdlet Copy-VMGuestFile 此超連結會帶您前往 Dell Technologies 以外的網站。 將檔案從 Windows 系統複製到部署在 VMware 中的 Linux NetWorker 系統。本知識庫文章提供使用 PowerCLI 的基本指示。如需其他詳細資料,請參閱 PowerCLI 和 Copy-VMGuestFile 上的 Microsoft 說明文件。

確認 VMware PowerCLI 是否已安裝在部署在與 Linux NetWorker 伺服器相同的 vCenter 的 Windows 伺服器上。從 Windows 伺服器上的管理 PowerShell 提示執行:

Get-Command -module *VMware*

輸出應顯示:
Cmdlet Copy-VMGuestFile 12.3.0......VMware.VimAutomation.Core

注意:PowerCLI 可安裝:
install-module -name VMware.PowerCLI -scope CurrentUser

如果已安裝 PowerCLI,請執行下列

1.從 Windows 伺服器的 PowerShell 系統管理員提示字元連線至 vCenter 伺服器:Connect-VIserver
例如:
PS C:\Users\Administrator> Connect-VIServer

cmdlet Connect-VIServer at command pipeline position 1
Supply values for the following parameters:
Server[0]: vcenter67.emclab.local
Server[1]:

Name                           Port  User
----                           ----  ----
vcenter67.emclab.local         443   VSPHERE.LOCAL\bkupadmin
注意:輸入 vCenter Server 後,請按下 Enter,系統會提示您指定 vCenter 使用者名稱。在某些環境中,Connect-VIServer 命令會失敗,並顯示 SSL 錯誤;或者,可以忽略:
Set-PowerCLIConfiguration -InvalidCertficateAction Ignore -Confirm:$false

2.使用 Copy-VMGuestFile Cmdlet 將所需的檔案複製到 Linux NetWorker 系統:
語法: 
Copy-VMGuestFile -Source PATH-TO-NEEDED-FILE -Destination PATH-ON-TARGET -VM VM_NAME -LocalToGuest -GuestUser TARGET-USER -GuestPassword TARGET-USER-PASSWORD
範例:
PS C:\Users\Administrator> Copy-VMGuestFile -Source "C:\Share\somefile1" -Destination "/tmp/somefile1" -VM VMRHEL7 -LocalToGuest -GuestUser root -GuestPassword 'Pa$$w0rd01'
PS C:\Users\Administrator>

3.確認檔案已複製到目標虛擬機器,如需上述範例,我們現在會看到:

[root@vmrhel7~]# ls -l /tmp
total 0-rw-r
--r--.1 根根 0 5 月 20 日 12:32 somefile1

Additional Information

此知識庫文章的目的是協助支援和客戶收集檔案,或將檔案移至 Linux NetWorker 系統。NetWorker 支援不應在客戶環境中設定 NFS、SMB、PowerCLI;如果需要這些程式的協助,請與 Linux/Windows 系統管理員接洽。

Affected Products

NetWorker

Products

NetWorker Series
Article Properties
Article Number: 000187100
Article Type: How To
Last Modified: 25 Sept 2024
Version:  6
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.