Paginas

08 February 2023

Upgrade Veeam Backup & Replication to v12 and SQL Server to PostgreSQL



In this Post I will show you how to upgrade Veeam Backup and Replication from version 11a to v12, including database migration from SQL Server to PostgreSQL (the default database in this new Veeam release).

I used RTM version released in 30 january 2023 (I think there won't be big differences for the GA version):

  • Previous Versions: 11.0.1.1261
  • Upgrade Version: 12.0.0.1402

The Upgrade and Migration are done in three steps:

  1. Upgrade v11a to v12 including all components (console, explorers, agents and plugins);
  2. Database Backup and Restore from SQL Server to PostgreSQL;
  3. Cleanup SQL Server databases and files.

Since it will be necessary to stop services and Backup Jobs, it is convenient that this process be carried out in a period where there is no backup window. This whole process takes about 2 hours (depending on the infrastructure).

Note: I will not cover the Veeam Backup Enterprise Manager Upgrade.

Let's start!

Upgrade v11a to v12 including all components (console, explorers, agents and plugins)

Before moving forward:

  • Snapshot/backup the Veeam Virtual Machine (if virtual)
  • Backup the Veeam Server (if physical)

 Download the ISO file from Veeam website and copy to the Veeam Backup Server:

  • RTM: VeeamBackup&Replication_12.0.0.1402_20230127.iso

Mount the ISO file, run the Upgrade and select "Upgrade Veeam Backup & Replication"

It is necessary to stop all jobs and services, otherwise the following error will appear (do not change services to manual/disable):


Accept the license agreement:

Click Next and disable the Update components. We will upgrade them later on:

 
 The licenses are valid from version 11 to 12 in the Upgrade, so we don't have to worry about them:
 

Check that everything is ok to continue:

Use always the LOCAL SYSTEM account in Veeam services. You can see my previous article on Hardening Veeam as a good practice:

Connect to the Veeam SQL Server database. Insert the SQL Server hostname/IP, database name and credentials:

After that, some configuration checks are performed. I had some warnings:

  • Veeam Backup Enterprise Manager in version 11 requires an upgrade
    • I don't know if this is a bug or just a warning, as I don't have the Enterprise Manager installed
  • I have HPE StoreOnce as a repository that is required to be in version >3.18.18 in GEN3 and >4.3.2 in GEN4
  • Veeam Agents for Linux must meet requirements (check the link placeholder after V12 is GA here)

Click Upgrade if you don't have any issue or critical warnings:

The Upgrade will start with six steps (for me it took about 30 minutes to complete):

Upgrade finished. Check if all the services are started:


 
Start Veeam Console and Upgrade all the managed servers at the same time or in prefered order. You could also upgrade the Linux/Windows agents (if you have any)

 Enable all the Jobs and wait a few days to check that everything is operational and without errors.

Migrate Veeam SQL Server Express/Standard/Enterprise to PostgreSQL

With this migration we also have the possibility to change the location of the Database services. By default and for security reasons, I like to keep Veeam and Database services on the same server, isolated from the protected environment.

Install PostgreSQL:

  • The installation is available in the Veeam  ISO file: <MountDrive>:\Redistr\x64\PostgreSQL\15.1-1
 
  • Choose the default install location or change it to another drive (the data can be placed in another drive as well):

 
  • Select all the components (Stack Builder is optional):

 
  • Choose the default data location or change it to another drive:
 
 
  • Create a password for the postgres superuser:

 
  • Choose the default or custom PortgreSQL port and leave the Default Locale:


 
  • Check the summary installation and click Next. After a few minutes the process is done.



Block port 5432 (or custom if you change this parameter in the installation) in windows firewall, so you cannot access remotely (if the database is not on the same server, you now have a good change of doing so);

Start pgadmin4 and choose a default password (this is only for pgadmin4 management):

 
 
You will see a default database named postgres. We will need to create a new database for Veeam. Let's call it VeeamBackup. You can also create a new user that will be this database owner.

Disconnect the new database, so that Veeam can use it for restore:

Backup Veeam Configuration to the same server (temporarily) so you can restore to the PostgresSQL database (after restore you can delete this backup file). Create also a password for restore:

 
  • My backup file used for restore:

Open the Configuration Restore application:

 
Select Restore mode:

 
Check all the items and configurations that will be restored:

Insert the password for restore:

 
Choose PostgreSQL database, the name of the new Database and the credentials that were created in pgadmin4:

 
Uncheck the advanced options:

 
Click restore. This process can take several minutes to complete. Mine took about 26 minutes:

 

Wait for all the services to start and the restore operation to complete:


In the pgadmin4 interface you can now see the database restored with all the tables:

Open the V&R console, Enable all the Jobs that were stoppped and check if everything is operational (wait a few days and then go to the next step):

Cleanup SQL Server Databases and Files

Now you can remove all the SQL Server components and be free from the licencing (if you have the SQL Server Standard/Enterprise edition with more than 10GB database):

  • Uninstall all the components besides SQL Server, like Clients, SDK, ODBC, OLE DB, CLR, etc.
  • Restart the server;
  • Take advantage of this downtime to update Windows, VMware Tools and VM Hardware (if virtual);
  • Clean up all the SQL files:
    • C:\Program Files\Microsoft SQL Server
    • C:\Program Files (86)\Microsoft SQL Server

Check if all the services are up and running and Veeam is working as expected.

Let the Jobs run for a few days and then explore all the new features that Veeam 12 have to offer!
I will soon write a new post with Veeam and StoreOnce integration for immutability (after the Veeam 12 GA is released).

See you!

2 comments:

  1. Olá Sérgio :-) If you like to cover the Enterprise Manager Migration it is quite straight forward, just head to C:\Program Files\Veeam\Backup and Replication\Enterprise Manager and run > .\Veeam.EM.DB.Migration.exe /file:"c:\temp\em.emco" /backupemdatabase this will backup and prepare the EM DB to PostgreSQL, then just run the following: .\Veeam.EM.DB.Migration.exe /file:"c:\temp\em.emco" /restoreemdatabase /servername:127.0.0.1 /serverport:5432 /initialcatalog:VeeamBackupReporting /login:adm /password:pass (just replace the localhost for your postgresql server and replace the user and password to your needs) the final step just run the Veeam Backup And Replication Configuration Database Connection Settings and point to the new DB running over Postgresql.

    ReplyDelete