In some cases engineering/support may provide/request files that need to be collected/placed from/on the NetWorker system; some options to copy files to/from the NetWorker system may not be possible under certain issues/configurations. This KB is a general KB to assist with various options for getting files on/off Linux NetWorker server's; including the NetWorker Virtual Edition (NVE) appliance.
Windows 11 and Windows Server 2019 (or later) have command-line SCP functionality. You can scp a file from a Windows system to a Linux server using:
scp FILE USER@HOSTNAME:/PATH/TO/PUT/FILE
There are also graphical user-interface tools which can be used to SCP files from a Windows system to a Linux system (For example: WinSCP , FileZilla ). These Windows utilities can be installed and use SSH/SCP to connect to the Linux NetWorker server to copy files to/from. This method uses the Linux user permissions of the user account specified when connecting to the Linux system from the SCP agent. This method requires the sshd service to be running on the NetWorker server.
NetWorker File Level Recovery (FLR):
If the NetWorker server is not accessible over SSH you can create a NetWorker client for the NetWorker server, for the save sets specify the files that you need copied off. Perform a backup of the newly created client; then perform a FLR of the files to a different target Linux system where SSH is working. The files can be SCP from the target system or copied from CIFS share to windows system if configured. This method can also be used to FLR files needed on the NetWorker server by backing them up on a remote Linux client then performing a FLR to the NetWorker server.
Depending on the specific Linux distribution installing NFS may differ. This should only be performed by the end user; this KB only provides basic NFS instructions, for additional information refer to NFS instructions for your Linux OS. NFS allows you to copy files between two Linux systems.
To confirm if NFS is running on the system the files will be copied from:
rpcinfo -p | grep nfs
The output should show:
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100227 3 tcp 2049 nfs_acl
If NFS is running perform the following:
1. Create a mountpoint: sudo mkdir /mnt/nfsshare
2. Place the file(s) needed in the /mnt/nfsshare directory using the Linux cp command.
3. Change the owner of the mountpoint: sudo chown -R nobody: /mnt/nfsshare
3. Set permissions on the mountpoint: sudo chmod -R 777 /mnt/nfsshare
4. Modify the /etc/exports file to contain the mountpoints and access information:
syntax: /mnt/nfsshare NETWORK-IP-ADDRESS/NETMASK(rw,sync,no_all_squash,root_squash)
example:
[root@CentOS8 ~]# cat /etc/exports
/mnt/nfsshare 192.168.25.0/24(rw,sync,no_all_squash,root_squash)
5. Export the share: sudo exportfs -arv
you can display the share with: sudo exportfs -s
From the NFS client system confirm you can reach the NFS server over port 2049
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
Resolve any firewall connection issues on or between the source/target NFS systems if connection times out or is refused.
6. Create a mountpoint on the NFS client system: sudo mkdir /tmp/mnt
7. Mount the NFS mountpoint on the client system:
sudo mount -t nfs NFS-SERVER-IP:/mnt/nfsshare/ /tmp/mnt
8. The files from the NFS server should now be seen on the NFS client under the mountpoint: 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. Copy the files to the local system: cp /tmp/mnt/* .
You can copy the needed files between a Windows system and the Linux NetWorker system if CIFS / SMB is installed on the Linux system. This configuration should only be performed by the end user. This KB only provides basic CIFS/SMB instructions; for more detailed instructions refer to CIFS/SMB instructions for your specific Linux OS. To check if SMB is running you can run:
sudo systemctl status smb
The sudo testparm command will show you how SMB is configured, e.g:
[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
The config file shown can be modified with sudo vi(this will require restarting the SMB service). The file should contain the domain name as the workgroup, netbios name of the Linux NetWorker server, and configuration parameters for the shared directory:
[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
If SMB is running on the NetWorker system perform the following:
1. Create a SMB share: sudo mkdir /mnt/samba
2. Copy the needed files to the /mnt/samba dir using the Linux cp command.
3. Change ownership of the samba dir: sudo chown -R nobody: /mnt/samba
4. Change permissions of the samba dir: sudo chmod -R 777 /mnt/samba
5. Restart the smb service: sudo systemctl restart smb
6. From a Windows system add a network location and specify the Linux NetWorker server and shared folder, e.g:
This uses the netbios name and the [Share] name from the Linux server's /etc/samba/smb.conf file
7. Once connected the files from the Linux server can be copied to a Windows system:
If you need to copy files to the NetWorker server but do not have SSH access you can create a mountable ISO containing the file(s) needed on the NetWorker server. How the ISO is mounted can vary depending on the server's backend, the following example will go over a VMware VM NetWorker server. This method is "read only" so it can only be used to copy files to the NetWorker server.
1. Collect the file(s) needed for the Linux NetWorker system.
2. Software such as PowerISO can be used to create an ISO file from the file, e.g:
3. The ISO can be uploaded to a VMware datastore then mounted to the NetWorker server VM's CD drive:
Note: Select Datastore ISO File from the drop down, check the connected box and Browse to the location the ISO was uploaded.
4. Connect to the NVE using a VMware console/web client connection and log in as root.
5. Create a temporary mountpoint: mkdir /tmp/mnt
6. Mount the CD drive to the mount point: mount /dev/cdrom /tmp/mnt
7. Copy the files out of the mount point: 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
Note: After entering the vCenter server(s) hit enter and you will be prompted to specify a vCenter user name. In some environments the Connect-VIServer command will fail with an SSL error; optionally, this can be ignored:
Copy-VMGuestFile -Source PATH-TO-NEEDED-FILE -Destination PATH-ON-TARGET -VM VM_NAME -LocalToGuest -GuestUser TARGET-USER -GuestPassword TARGET-USER-PASSWORD
example:
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. Confirm the file was copied to the target VM, for the above example we now see:
[root@vmrhel7 ~]# ls -l /tmp
total 0
-rw-r--r--. 1 root root 0 May 20 12:32 somefile1