// Module included in the following assemblies:
//
// backup_and_restore/application_backup_and_restore/oadp-vmdp/oadp-using-vmdp.adoc

:_mod-docs-content-type: PROCEDURE
[id="oadp-vmdp-creating-bsl-s3_{context}"]
= Creating a backup storage location with S3-compatible storage by using the VMDP CLI

[role="_abstract"]
Create a backup storage location (BSL) with S3-compatible storage to set up an encrypted repository for storing your virtual machine (VM) backups. This helps you to configure remote S3-compatible storage for your data.

When you create a BSL, the virtual machine data protection (VMDP) command-line interface (CLI) creates a personal encrypted repository in the specified storage backend. You provide the encryption password, which is used to encrypt all backup data. Only users with this password can access the backup data.

.Prerequisites

* You have installed the VMDP CLI inside your VM.
* You have the storage credentials for your S3-compatible storage.

.Procedure

. To create a BSL with S3-compatible storage, run the following command:
+
[source,terminal]
----
$ sshpass -p <vm_password> virtctl ssh vm/<vm_name> -n <vm_namespace> \
  --username <vm_username> \
  --local-ssh-opts=-oUserKnownHostsFile=/dev/null \
  --local-ssh-opts=-oStrictHostKeyChecking=no \
  --local-ssh-opts=-oPreferredAuthentications=password \
  --local-ssh-opts=-oPubkeyAuthentication=no \
  --command "./oadp-vmdp_linux_amd64 bsl create s3 --bucket <bucket_name> --endpoint <s3_endpoint> --access-key <access_key> --secret-access-key <secret_access_key> --disable-tls"
----
+
where:

`<vm_password>`:: Specifies the password for the VM user.
`<vm_name>`:: Specifies the name of the VM.
`<vm_namespace>`:: Specifies the namespace of the VM.
`<vm_username>`:: Specifies the username for the VM. For example, `fedora`.
`<bucket_name>`:: Specifies the name of the S3 bucket.
`<s3_endpoint>`:: Specifies the S3 endpoint URL.
`<access_key>`:: Specifies the access key ID.
`<secret_access_key>`:: Specifies the secret access key.

+
You should see an output similar to the following example:
+
[source,terminal]
----
Initializing repository with:
  block hash:          BLAKE2B-256-128
  encryption:          AES256-GCM-HMAC-SHA256
  key derivation:      scrypt-65536-8-1
  splitter:            DYNAMIC-4M-BUZHASH
----

. Create an alias for the VMDP binary and name it `oadp-vmdp`.

.Verification

* To verify the BSL connection status, run the following command:
+
[source,terminal]
----
$ oadp-vmdp bsl status
----
