-
- Enthusiast
- Posts: 88
- Liked: 8 times
- Joined: Oct 13, 2020 1:40 pm
- Full Name: Leo
- Contact:
We want to install PostgreSQL as part of Veeam12 installation instead MSSQL 2012 via PowerShell
Hi Experts,
We have raised a case, below is the ID.
07482949
We want to use PostgreSQL as part of Veeam12 installation via PowerShell. Right now we are using MSSQL 2012. We want to ignore the MSSQL and Install PostgreSQL as part of Veeam installation. We exactly don't know what where to add the PostgreSQL in the code. I have the working code for the Veeam installation. Can someone help me to add PostgreSQL instead of MSSQL . If you need the code I can share my PowerShell code.
I am looking forward to hearing from you
Regards
Leo
We have raised a case, below is the ID.
07482949
We want to use PostgreSQL as part of Veeam12 installation via PowerShell. Right now we are using MSSQL 2012. We want to ignore the MSSQL and Install PostgreSQL as part of Veeam installation. We exactly don't know what where to add the PostgreSQL in the code. I have the working code for the Veeam installation. Can someone help me to add PostgreSQL instead of MSSQL . If you need the code I can share my PowerShell code.
I am looking forward to hearing from you
Regards
Leo
-
- Veeam Software
- Posts: 2838
- Liked: 650 times
- Joined: Jun 28, 2016 12:12 pm
- Contact:
Re: We want to install PostgreSQL as part of Veeam12 installation instead MSSQL 2012 via PowerShell
Hi Leo,
Please follow the guide here: https://helpcenter.veeam.com/docs/backu ... ml?ver=120
Silent Install uses an "Answer File" to pass along the parameters for silent installation which can be run via powershell. To install Postgres, set this parameter:
Please follow the guide here: https://helpcenter.veeam.com/docs/backu ... ml?ver=120
Silent Install uses an "Answer File" to pass along the parameters for silent installation which can be run via powershell. To install Postgres, set this parameter:
VBR_SQLSERVER_ENGINE
Specify 1 to use PostgreSQL engine or specify 0 to use Microsoft SQL engine. Note that if you want to create a new SQL server instance, you can only choose the PostgreSQL engine, that is, set the parameter to 1.
David Domask | Product Management: Principal Analyst
-
- Enthusiast
- Posts: 88
- Liked: 8 times
- Joined: Oct 13, 2020 1:40 pm
- Full Name: Leo
- Contact:
Re: We want to install PostgreSQL as part of Veeam12 installation instead MSSQL 2012 via PowerShell
@david.domask
Hi David,
Thanks much for your effort. You always help the people who is looking for help in Veeam Forum.
Much appreciated.
Below is my code for our current Veeam 12 Installation.
Can I remove the below following things from my code since we are looking only for PostgreSQL ?
# Install SQLSysClrTypes,
# Install SQL Shared Management Objects,
# Install SQL Express and
# Copying and Importing the SQL Powershell module
and also could you please confirm how can I modify the below line for Veeam Backup and Replication. As you suggested I wanted to add Specify 1 to use PostgreSQL engine in my code
Could you please help it out
Thanks in advance.
I am looking forward to hearing from you.
Hi David,
Thanks much for your effort. You always help the people who is looking for help in Veeam Forum.
Much appreciated.
Below is my code for our current Veeam 12 Installation.
Can I remove the below following things from my code since we are looking only for PostgreSQL ?
# Install SQLSysClrTypes,
# Install SQL Shared Management Objects,
# Install SQL Express and
# Copying and Importing the SQL Powershell module
and also could you please confirm how can I modify the below line for Veeam Backup and Replication. As you suggested I wanted to add Specify 1 to use PostgreSQL engine in my code
Could you please help it out
Thanks in advance.
I am looking forward to hearing from you.
/passive /i "$VEEAMINSTALLER\Backup\Server.x64.msi" ACCEPTEULA="yes" ACCEPT_THIRDPARTY_LICENSES="1" ACCEPT_LICENSING_POLICY=1 ACCEPT_REQUIRED_SOFTWARE=1 VBR_LICENSE_FILE=$VEEAMINSTALLER\Veeam-32sockets-backup-ent-perpetual.lic VBR_SERVICE_USER=$user VBR_SERVICE_PASSWORD=$password VBR_SQLSERVER_ENGINE="0" VBR_SQLSERVER_SERVER=$env:COMPUTERNAME\VEEAM VBR_SQLSERVER_DATABASE=VeeamBackup VBR_SQLSERVER_AUTHENTICATION=0 VBR_SQLSERVER_USERNAME=$user VBR_SQLSERVER_PASSWORD=$password /l*v "$VEEAMINSTALLER\Server.x64.log
Code: Select all
# Install SQLSysClrTypes
Log "Validating if SQLSysClrTypes is already installed"
$SQLSysClrTypesInstallStatus = Get-WmiObject Win32_Product | Where {$_.Name -match 'System CLR Types for SQL'}
if ($SQLSysClrTypesInstallStatus)
{
Log "SQLSysClrTypes is already installed"
}
else
{
try
{
Log "Installing SQLSysClrTypes.msi"
$InstallCommandArguments = @"
/quiet /i "$VEEAMINSTALLER\Redistr\x64\SQLSysClrTypes.msi" /l*v "$VEEAMINSTALLER\SQLSysClrTypes.log"
"@
Start-Process msiexec -ArgumentList $InstallCommandArguments -Wait
}
catch
{
Log "Install Failed"
Throw "Install Failed"
}
}
# Install SQL Shared Management Objects
Log "Validating if SharedManagementObjects is already installed"
$SharedManagementObjectsInstallStatus = Get-WmiObject Win32_Product | Where {$_.Name -match 'SQL Server 2014 Management Objects'}
if ($SharedManagementObjectsInstallStatus)
{
Log "SharedManagementObjects is already installed"
}
else
{
try
{
Log "Installing SharedManagementObjects.msi"
$InstallCommandArguments = @"
/quiet /i "$VEEAMINSTALLER\Redistr\x64\SharedManagementObjects.msi" /l*v "$VEEAMINSTALLER\SharedManagementObjects.log"
"@
Start-Process msiexec -ArgumentList $InstallCommandArguments -Wait
}
catch
{
Log "Install Failed"
Throw "Install Failed"
}
}
# Install SQL Express
Log "Validating if SQL2012EXP is already installed"
$SQL2012EXPInstallStatus = Get-WmiObject Win32_Product | Where {$_.Name -match 'SQL Server 2012'}
if ($SQL2012EXPInstallStatus)
{
Log "SQL2012EXP is already installed"
}
else
{
try
{
Log "Installing SQL"
ExecuteProcess -fullexepath "$VEEAMINSTALLER\Redistr\x64\SQLEXPR_x64_ENU.exe" -arglist "/qs /ACTION=Install /FEATURES=SQL /INSTANCENAME=MSSQLSERVER /IACCEPTSQLSERVERLICENSETERMS"
ExecuteProcess -fullexepath "$VEEAMINSTALLER\Redistr\x64\SQLEXPR_x64_ENU.exe" -arglist "/qs /ACTION=PrepareImage /FEATURES=SQL,RS /INSTANCEID=VEEAMSQL2012 /IACCEPTSQLSERVERLICENSETERMS"
ExecuteProcess -fullexepath "$VEEAMINSTALLER\Redistr\x64\SQLEXPR_x64_ENU.exe" -arglist "/qs /ACTION=CompleteImage /INSTANCENAME=VEEAM /INSTANCEID=VEEAMSQL2012 /SQLSYSADMINACCOUNTS=$user /AGTSVCACCOUNT='NT AUTHORITY\SYSTEM' /IACCEPTSQLSERVERLICENSETERMS"
# Setting SQL Services to Automatic
Log "Starting SQL Services"
Get-Service -Name SQL*,MSSQL* | Set-Service -StartupType Automatic
}
catch
{
Log "Install Failed"
Throw "Install Failed"
}
}
# Copying and Importing the SQL Powershell module
Log "Validating if SQL files are already Copied"
$Program_Files1 = "C:\Program Files\WindowsPowerShell\Modules"
$Program_Files2 = "C:\Program Files (x86)\WindowsPowerShell\Modules"
$SQLfile1 = test-path "$Program_Files1\SQLServer"
$SQLfile2 = test-path "$Program_Files2\SQLServer"
if($SQLfile1 -and $SQLfile2)
{
Log "SQL files are already copied"
}
else
{
Copy-Item "$VEEAMINSTALLER\SQLServer" "C:\Program Files\WindowsPowerShell\Modules" -Recurse
Copy-Item "$VEEAMINSTALLER\SQLServer" "C:\Program Files (x86)\WindowsPowerShell\Modules" -Recurse
}
Import-Module "C:\Program Files\WindowsPowerShell\Modules\SQLServer\SqlServer.psd1"
# Set sysadmin previleage to System account
Invoke-Sqlcmd -ServerInstance "$ENV:COMPUTERNAME\VEEAM" -Query "exec sp_addsrvrolemember 'NT AUTHORITY\SYSTEM','sysadmin'"
# Installing Backup and Replication Server
Log "Installing Backup and Replication Server"
$BackupReplicationStatus = Get-WmiObject Win32_Product | Where {$_.Name -match 'Veeam Backup & Replication Server'}
if ($BackupReplicationStatus)
{
Log "Backup and Replication server is already installed"
}
else
{
try
{
$InstallCommandArguments = @"
/passive /i "$VEEAMINSTALLER\Backup\Server.x64.msi" ACCEPTEULA="yes" ACCEPT_THIRDPARTY_LICENSES="1" ACCEPT_LICENSING_POLICY=1 ACCEPT_REQUIRED_SOFTWARE=1 VBR_LICENSE_FILE=$VEEAMINSTALLER\Veeam-32sockets-backup-ent-perpetual.lic VBR_SERVICE_USER=$user VBR_SERVICE_PASSWORD=$password VBR_SQLSERVER_ENGINE="0" VBR_SQLSERVER_SERVER=$env:COMPUTERNAME\VEEAM VBR_SQLSERVER_DATABASE=VeeamBackup VBR_SQLSERVER_AUTHENTICATION=0 VBR_SQLSERVER_USERNAME=$user VBR_SQLSERVER_PASSWORD=$password /l*v "$VEEAMINSTALLER\Server.x64.log
"@
Start-Process msiexec -ArgumentList $InstallCommandArguments -Wait
}
catch
{
Log "Install Failed"
Throw "Install Failed"
}
}
-
- Veeam Software
- Posts: 2838
- Liked: 650 times
- Joined: Jun 28, 2016 12:12 pm
- Contact:
Re: We want to install PostgreSQL as part of Veeam12 installation instead MSSQL 2012 via PowerShell
Hi Leo,
You're very welcome and thank you for the kind words.
For your question, please see our System Requirements page here for the backup server, specifically the software section:
>Microsoft SQL Server System CLR Types (both for SQL Server and PostgreSQL installations)
So yes, please keep the CLR Types at this time. SQL Express however can be skipped naturally as you're planning to use Postgres.
Thanks!
You're very welcome and thank you for the kind words.
For your question, please see our System Requirements page here for the backup server, specifically the software section:
>Microsoft SQL Server System CLR Types (both for SQL Server and PostgreSQL installations)
So yes, please keep the CLR Types at this time. SQL Express however can be skipped naturally as you're planning to use Postgres.
Thanks!
David Domask | Product Management: Principal Analyst
-
- Enthusiast
- Posts: 88
- Liked: 8 times
- Joined: Oct 13, 2020 1:40 pm
- Full Name: Leo
- Contact:
Re: We want to install PostgreSQL as part of Veeam12 installation instead MSSQL 2012 via PowerShell
@david.domask
Hi David
Thanks a lot for your explanation. It means a lot.
I will work on this and I will let you know.
Hi David
Thanks a lot for your explanation. It means a lot.
I will work on this and I will let you know.
-
- Enthusiast
- Posts: 88
- Liked: 8 times
- Joined: Oct 13, 2020 1:40 pm
- Full Name: Leo
- Contact:
Re: We want to install PostgreSQL as part of Veeam12 installation instead MSSQL 2012 via PowerShell
@david.domask
Hi David,
Whatever you suggested, it's working as expected.
Answer File and silent installation fixed this.
Just wanted to give the credits to you. Thanks much.
Regards
Leo
Hi David,
Whatever you suggested, it's working as expected.
Answer File and silent installation fixed this.
Just wanted to give the credits to you. Thanks much.
Regards
Leo
Who is online
Users browsing this forum: Google [Bot] and 2 guests