KB10045 - S3 bucket as Storage provider

KB ID: 10045

Product: vProtect

Version: not applicable

Published: 2021-10-21

Last modified: 2021-10-21

Problem

The client would like to be able to backup his environment based on the Object Storage: bucket S3/S3-compatible.
For example: Ceph RGW

Solution

Log in to vProtect node via SSH, then:

1. Install the EPEL repository:

sudo yum install epel-release

2. Install the S3FS package:

sudo yum install s3fs-fuse

3. Then create a file in which S3 access data will be stored, such as:

  • ACCESS_KEY

  • SECRET_KEY

echo "ACCESS_KEY:SECRET_KEY" | sudo tee /etc/passwd-s3fs

4. Then use chmod to set the necessary permissions to secure the file. 600 ensures that only the root will be able to read and write to the file. If this step is skipped, you will be unable to mount the Object Storage bucket:

5. With the global credential file in place, the next step is to choose a mount-point. This is the directory on your vProtect node where the Object Storage bucket will be mounted. It can be any empty directory on your server, but for the purpose of this guide, we will be creating a new directory specifically for this.

6. Now you need to mount our S3 bucket in the created directory:

Note:

  • {bucketname} is the name of the bucket that you wish to mount.

  • {/mountpoint/dir/} is the empty directory on your server where you plan to mount the bucket (it must already exist).

  • /etc/passwd-s3fs is the location of the global credential file that you created earlier. If you created it elsewhere you will need to specify the file location here.

  • -o allow_other allows non-root users to access the mount. Otherwise, only the root user will have access to the mounted bucket.

  • -o url specifies the private network endpoint for the Object Storage. This can be found by clicking the S3 API access link. Don’t forget to prefix the private network endpoint with https://

sudo s3fs {bucketname} {/mountpoint/dir/} -o passwd_file=/etc/passwd-s3fs -o allow_other -o url=https://{private-network-endpoint}

7. (Optional): Mounting your Object Storage bucket automatically on boot

In order for the mounting to take place automatically during system startup, edit the /etc/fstab file and add an entry:

8. Then, in the vProtect UI, you need to add a new Storage Provider (File System) and create an instance, the path of which will indicate where the bucket is mounted by S3FS.

 

 

 

Note:

s3fs#s3bucket /mnt/backupbucket fuse rw,allow_other,umask=0000,uid=992,gid=993 0 0