KB10040 How to attach a Windows SMB share as vProtect Backup Destination?

📚

Documentation

Installation guides, configuration steps, and product documentation.

Explore documentation →

🎧

Support

Create a support request or review your existing cases.

Go to support →

⬇️

Download trial

Download the product trial and try it out.

View downloads →

KB10040 How to attach a Windows SMB share as vProtect Backup Destination?

KB ID: 10040

Product: vProtect

Version: not applicable

Published: 2021-07-02

Last modified: 2021-07-02

Problem

Cannot use Windows SMB share as vProtect Backup Destination due to a permission error.

 

example from the vPortect GUI output

ExternalAPIException: Could not create directory: /vprotect_data/backup/test_vm

 

Solution

 

Check if your windows share is set up as in the screenshot below:

 

Install CIFS utilities package on vProtect node host:

sudo dnf install cifs-utils

[root@vprotect ~]# sudo dnf install cifs-utils
Last metadata expiration check: 0:39:47 ago on Fri Jul 2 14:29:32 2021.
Dependencies resolved.
===========================================================================================================================================================================================================
Package Architecture Version Repository Size
===========================================================================================================================================================================================================
Installing:
cifs-utils x86_64 6.8-3.el8 baseos 96 k
Installing dependencies:
keyutils x86_64 1.5.10-6.el8 baseos 63 k

Transaction Summary
===========================================================================================================================================================================================================
Install 2 Packages

Total download size: 159 k
Installed size: 307 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): keyutils-1.5.10-6.el8.x86_64.rpm 708 kB/s | 63 kB 00:00
(2/2): cifs-utils-6.8-3.el8.x86_64.rpm 949 kB/s | 96 kB 00:00
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 783 kB/s | 159 kB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : keyutils-1.5.10-6.el8.x86_64 1/2
Installing : cifs-utils-6.8-3.el8.x86_64 2/2
Running scriptlet: cifs-utils-6.8-3.el8.x86_64 2/2
Verifying : cifs-utils-6.8-3.el8.x86_64 1/2
Verifying : keyutils-1.5.10-6.el8.x86_64 2/2

Installed:
cifs-utils-6.8-3.el8.x86_64 keyutils-1.5.10-6.el8.x86_64

Complete!

 

Then go to the vProtect node host and mount the share to the backup destination folder. Replace WIN_SMB_HOST_IP your IP or doman name.

mount -t cifs -o username=test,uid=vprotect,gid=vprotect,file_mode=0770,dir_mode=0770 //10.41.0.3/test /vprotect_data/backups

[root@vprotect ~]# mount -t cifs -o username=test,uid=vprotect,gid=vprotect,file_mode=0770,dir_mode=0770 //WIN_SMB_HOST_IP/test /vprotect_data/backups

Password for test@//WIN_SMB_HOST_IP/test: ********

 

To automatically mount a Windows share when vProtect host starts up, define the mount in the /etc/fstab file. It is recommended to use a credentials file, which contains the share username, password and domain.

cat /etc/fstab | grep /vprotect_data/backups

[root@vprotect ~]# cat /etc/fstab | grep /vprotect_data/backups

//WIN_SMB_HOST_IP/test        /vprotect_data/backups        cifs        credentials=/etc/credentials_winsmb,uid=vprotect,gid=vprotect,file_mode=0770,dir_mode=0770       0        0

[root@vprotect ~]# cat /etc/credentials_winsmb

username=test
password=your_password
domain=your_doman_name

 

You can check if the new files created by the vprotect user have the proper permissions:

sudo -u vprotect touch /vprotect_data/backups/vprotect

[root@vprotect ~]# sudo -u vprotect touch /vprotect_data/backups/vprotect

[root@vprotect ~]# ls -la /vprotect_data/backups/vprotect

-rwxrwx--- 1 vprotect vprotect 0 Jul 2 15:49 /vprotect_data/backups/vprotect