New-VEPSQLLinuxCredential

Short Description

Creates Linux credential records to connect to Linux machines.

Applies to

Veeam Backup & Replication

Product Edition: Enterprise, Enterprise Plus, Veeam Universal License

Syntax

New-VEPSQLLinuxCredential [-Account] <string> [-Password <securestring>] [-PrivateKeyFilePath <string>] [-Passphrase <securestring>] [-ElevateAccountToRoot] [-AddToSudoers] [-UseSuIfSudoUnavailable] [-RootPassword <securestring>]  [<CommonParameters>]

Detailed Description

This cmdlet creates Linux credential records. You can use these credential records to connect to the PostgreSQL database and perform operations with PostgreSQL instances.

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Account

Specifies a user name of the account that will be used to connect to the target Linux server.

String

True

0

False

Password

Specifies a password that will be used to connect to the target Linux server.

Securestring

True

Named

False

PrivateKeyFilePath

Specifies the path for the private key. The cmdlet will use that key to connect to the target Linux server.

String

True

Named

False

Passphrase

Specifies a passphrase. The cmdlet will use that passphrase to connect to the target Linux server.

Securestring

True

Named

False

ElevateAccountToRoot

Defines that the account must be elevated to root.

SwitchParameter

False

Named

False

AddToSudoers

Defines that the cmdlet will add the account to the sudoers file.

SwitchParameter

False

Named

False

UseSuIfSudoUnavailable

Defines that the su command is used instead of the sudo command.

SwitchParameter

False

Named

False

RootPassword

Specifies the root password.

Securestring

False

Named

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About Common Parameters section of Microsoft Docs.

Examples

New-VEPSQLLinuxCredentialExample 1. Creating Linux Credential Records With Password

This example shows how to create Linux credential records. Veeam Explorer for PostgreSQL will use these credentials to connect to Linux machines using a password.

$securepassword = Read-Host -Prompt "Enter password" -AsSecureString

New-VEPSQLLinuxCredential -Account "root" -Password $securepassword

Perform the following steps:

  1. Run the Read-Host cmdlet to create a secure password. Enter credentials that will be used to connect to the Veeam Backup & Replication server. Define the AsSecureString parameter. Save the result to the $securepassword variable.
  2. Run the New-VEPSQLLinuxCredential cmdlet. Specify the Account parameter value. Set the $securepassword variable as the Password parameter value.

New-VEPSQLLinuxCredentialExample 2. Creating Linux Credential Records With Private Key

This example shows how to create Linux credential records. Veeam Explorer for PostgreSQL will use these credentials to connect to Linux machines using the private key.

$securepassword = Read-Host -Prompt "Enter secure string" -AsSecureString

New-VEPSQLLinuxCredential -Account "root" -PrivateKeyFilePath "/home/.ecryptfs/<user>/.Private/" -Passphrase $securepassword

Perform the following steps:

  1. Run the Read-Host cmdlet to create a secure password. Enter credentials that will be used to connect to the Veeam Backup & Replication server. Define the AsSecureString parameter. Save the result to the $securepassword variable.
  2. Run the New-VEPSQLLinuxCredential cmdlet. Specify the following settings:
  • Specify the Account parameter value.
  • Specify the PrivateKeyFilePath parameter value.
  • Set the $securepassword variable as the Passphrase parameter value.

Related Commands

Read-Host