Sometimes engineering or support may provide or request files that must be transferred to or from 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 or 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 an 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 the 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 an 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 see 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, run the following command:
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 files needed in the /mnt/nfsshare directory using the Linux cp command.
3. Change the owner of the mountpoint:
sudo chown -R nobody: /mnt/nfsshare
4. Set permissions on the mountpoint:
sudo chmod -R 777 /mnt/nfsshare
5. 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@linuxserver ~]# cat /etc/exports /mnt/nfsshare 192.168.0.0/24(rw,sync,no_all_squash,root_squash)
6. 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@linuxserver ~]# curl -v nsr:2049 * Rebuilt URL to: nsr:2049/ * Trying 192.168.0.5... * TCP_NODELAY set * Connected to centos8 (192.168.0.5) port 2049 (#0) ... Removed for brevity
Resolve any firewall connection issues on or between the source/target NFS systems if the 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@linuxserver ~]# 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 see CIFS/SMB instructions for your specific Linux OS. To check if the SMB service is running, you can run:
sudo systemctl status smb
The sudo testparm command shows you how SMB is configured, e.g:
[root@linuxserver ~]# 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 configuration file shown can be modified with sudo vi(this requires 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@linuxserver ~]# cat /etc/samba/smb.conf [global] workgroup = amer server string = Samba Server %v netbios name = linuxserver 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 an 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:
To copy files to the NetWorker server without SSH access, you can create a mountable ISO containing the files needed on the NetWorker server. How the ISO is mounted can vary depending on the server's backend, the following example goes 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 files 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:
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]: vcenter.amer.lan Server[1]: Name Port User ---- ---- ---- vcenter.amer.lan 443 VSPHERE.LOCAL\bkupadminAfter entering the vCenter servers, press enter. You are prompted to specify a vCenter username. In some environments, the Connect-VIServer command fails with an SSL error; optionally, this can be ignored:
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false
Copy-VMGuestFile -Source PATH-TO-NEEDED-FILE -Destination PATH-ON-TARGET -VM VM_NAME -LocalToGuest -GuestUser TARGET-USER -GuestPassword TARGET-USER-PASSWORDExample:
PS C:\Users\Administrator> Copy-VMGuestFile -Source "C:\Share\somefile1" -Destination "/tmp/somefile1" -VM LINUXVM -LocalToGuest -GuestUser root -GuestPassword 'Pa$$w0rd01' PS C:\Users\Administrator>
3. Confirm that the file was copied to the target VM, for the above example we now see:
[root@linuxserver ~]# ls -l /tmp total 0 -rw-r--r--. 1 root root 0 May 20 12:32 somefile1