Skip to main content

If you have usecase to change location (disk) of PostgreSQL binaries with databases, where is not an option by Veeam wizard and change user, and if you need to change from default postgres user to different one. Or only one of the option.


My usecase is to change from D:\ to E:\ drive and change back from non-standard user veeam to postgres due custom installation of PostgreSQL.

Changing user of databases is possible, but not for templates, so easy. 

This usecase is for administrators with minimal knowledge, so via easiest way :)

 

  1. Stop Veeam Services

 

After Veeam application is down, change on PostgreSQL could be provided.

First is needed to create postgres user as is missing due custom installation (not via Veeam wizard). This could be done for existing role.

  1. Change postgres back as role
  1. Set user as owner of databases - VBR and EM.

      Changing from veeam user to postgres user

VBR Database
Enterprise Manager Database
  1. Checking of ownership via psql.
Owners
  1. Local backup of all

      This Dump will be used for recovery.

Local backup

Remove server - is good to remove if you have some customer settings of pgAdmin4 like to avoid entering master password by starting console.

Remove server
  1. Uninstall old PostgreSQL binaries

 

  1. Reboot of the VBR server
  1. Install new binaries via unattended installation.
Unattended installation
  1. Create empty VBR and EM databases

     Without that step is not possible to recovery these databases.

Dummy VBR and EM databases
  1. Full Recovery from dump
Full recovery
Finish of recovery

 

  1. Check ownership of databases including templates
  2. Now we can see that database and templates have owner as required.
ownership
  1. Connection to VBR into new Database via Configuration Database Connection Settings of Veeam utility

     Now is needed to link application to correct location of VBR database.

VBR connection
  1. Connection to EM into new Database via Configuration Database Connection Settings of Veeam utility

    And as well is needed to link application to correct location of VBR database.

 

EM Connection

 

Great post on moving PG.  Very interesting and nice use case.


nice work!


Comment