When I try to upgrade Veeam, or when I try to apply a new license, I get a prompt about my server being managed by a Veeam Enterprise Manager server like the prompt below. But I don't have one? How can I fix this?
This is a question that comes up from time-to-time here in the Community Hub as well as the Veeam Subreddit. Generally, the subject, me in today's example, has a VBR server in place, and previously had a Veeam Enterprise Manager server as well, but VEM server since been removed and VBR doesn't know it because there's still an entry referencing VEM in the VBR configuration database. Enterprise Manager is a great tool if you have multiple VBR servers to manage, or need any of it's various features such as the reporting or capability to recover lost encryption passwords, but in my case, I don't need it and the server was actually removed several years ago and I had been putting off opening a case and cleaning this up for at least a couple years, so let's get down to it.
A quick disclaimer. This post involves directly editing your Veeam configuration database. This is not recommended without the guidance of Veeam support. Directly editing your configuration database can be catastrophic to your VBR deployment. Don't do this if you don't know what you're doing, aren't comfortable with risk, and haven't taken the appropriate measures to protect your Veeam deployment. If your Veeam server is virtual (or database server if it's external), a quick snapshot is another great idea -- just remember to commit the snapshot after.
First off, you need to backup your database like all good backup admins would do, right? We are dealing with backups after all. Reference Veeam KB 1471 on how to backup your database. In my case, this reference to VEM is VERY old and predates my tenure although I was the person who removed VEM many years ago without knowing much about it, and this reference also survived my migration's from 9.5 > 10 > 10a > 11 > 11a > 12 > 12.1 > 12.2 and in those upgrades to 12, a migration to a new backup server, and one that also migrated from MS SQL Express to PostgreSQL.
Back to backing up the database. Pretty simple....follow the aforementioned Veeam KB. To save the click for Postgres users, run the below command from an elevated PowerShell prompt. Note this must be PowerShell. I tried to run from a cmd prompt initially, and while it didn’t throw any errors aside from starting with an ampersand, it also created a 0 byte file with the incorrect name. That should teach me to read instructions better and then wonder why something isn’t working as expected.
& "C:\Program Files\PostgreSQL\15\BIN\pg_dump.exe" -U postgres -F c -b -f "C:\Temp\PGDBBackup_$($env:computername)_$(get-date -f yyyy-MM-dd_HH.mm).sql" VeeamBackup
After a successful backup, it's time to edit the database. In my case, I'm using pgAdmin 4. Because again, I'm a Postgres newb, and a GUI suits me today. After poking around a bit in the VeeamBackup database, I was able to find where Tables are found. It's a bit different than a MS SQL database layout in SQL Studio, but I found it by browsing through Servers > PostgreSQL 15 > Databases > VeeamBackup > Schemas > public > Tables. Fire up the Query tool and run the following command to view any references to VEM.
SELECT * FROM public.options
WHERE Name = 'EnterpriseServerInfo'
You should get a result like the one below indicating there is an entry in the Options table called EnterpriseServerInfo referencing the UID of your old Enterprise Manager server.
If that looks good to you, then execute the following query to remove any references to an Enterprise Server.
DELETE FROM public.options
WHERE Name = 'EnterpriseServerInfo'
Then you can run your query again to validate that the entry no longer exists.
After doing so, you should be able to run upgrades, or apply licenses and will no longer be prompted about an Enterprise Manager server being attached to your VBR instance. For instance, if you attempt to install a license, you're prompted with the regular window to locate the license. With that said, I'm a Postgres newbie - would you have done anything differently?