在某些情況下,工程/支援可能會提供/要求需要從 NetWorker 系統收集/放置的檔案;在某些問題/組態下,可能無法選擇將檔案複製到/從 NetWorker 系統複製的某些選項。此 KB 是一般 KB,可協助您選擇在 Linux NetWorker 伺服器上/關閉檔案;包括 NetWorker Virtual Edition (NVE) 應用裝置。
其中一種簡單的方法是使用 SCP 代理程式 (WinSCP 、 FileZilla )。您可以安裝這些 Windows 公用程式,並使用 SSH/SCP 連線至 Linux NetWorker 伺服器來複製檔案。此方法使用從 SCP 代理程式連線至 Linux 系統時,指定使用者帳戶的 Linux 使用者許可權。此方法需要在 NetWorker 伺服器上執行 sshd 服務。
NetWorker 檔案層級復原 (FLR):
如果無法透過 SSH 存取 NetWorker 伺服器,您可以為 NetWorker 伺服器建立 NetWorker 用戶端,因為儲存集會指定您需要複製的檔案。執行新建立用戶端的備份;接著,將檔案的 FLR 執行到 SSH 運作中不同的目標 Linux 系統。檔案可以是來自目標系統的 SCP,或者從 CIFS 共用複製到 Windows 系統 (若已設定)。此方法也可用於 NetWorker 伺服器上所需的 FLR 檔案,方法是將其備份在遠端 Linux 用戶端上,然後將 FLR 執行到 NetWorker 伺服器。
視特定 Linux 分散式裝置安裝 NFS 而定,NFS 可能會有所不同。這僅應由終端使用者執行;本知識庫僅提供基本 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/*
如果已在 Linux 系統上安裝 CIFS /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 伺服器和共用資料夾,例如:
這會使用 Linux 伺服器 /etc/samba/smb.conf 檔案
7 的 netbios 名稱和 [Share] 名稱。將 Linux 伺服器的檔案連線後,即可複製到 Windows 系統:
如果您需要將檔案複製到 NetWorker 伺服器但沒有 SSH 存取權,您可以建立可掛接的 ISO,其中包含 NetWorker 伺服器上所需的檔案。ISO 的掛接方式可能會因伺服器的後端而有所不同,下列範例會移至 VMware VM NetWorker 伺服器。此方法為「唯讀」,因此只能用來將檔案複製到 NetWorker 伺服器。
1.收集 Linux NetWorker 系統所需的檔案。
2.PowerISO 等軟體可用來建立檔案中的 ISO 檔案,例如:
3.ISO 可上傳至 VMware 資料存放區,然後掛接至 NetWorker 伺服器 VM 的 CD 磁片磁碟機:
注意:從下拉式選單中選取資料存放區 ISO 檔案、勾選連接方塊,然後流覽至 ISO 上傳的位置。
4.使用 VMware 主控台/Web 用戶端連線連線至 NVE,並以root 身分登入。
5.建立暫時掛接點:mkdir /tmp/mnt
6.將 CD 磁片磁碟機掛載至掛接點:掛載 /dev/cdrom /tmp/mnt
7.將檔案從掛接點複製:cp /mnt/cdrom/*
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 錯誤;或者,可以忽略:
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