Upgrade to NVBU 12 fails with: Error renaming ..NetVault Backup/pgsql_new to ..NetVault Backup/pgsql
While upgrading the NetVault Backup server to NVBU version 12 the following pop up message is displayed and the upgrade fails:
----
Error
There has been an error.
Error renaming ..NetVault Backup/pgsql_new to ..NetVault Backup/pgsql
The application will exit now.
----
NetVault is not upgraded and the older version remains.
While the NetVault service may be started, login to the Web UI fails.
The bitrock_installer*.log generated in the Windows Temp folder shows that the upgrade fails during the PostgreSQL upgrade phase.
The pg_upgrade command exits with:
----
Cannot delete file E:/Program Files (x86)/Dell/NetVault/pgsql
[xx:xx:xx] installationAbortedActionList: begin
[xx:xx:xx] installationAbortedActionList: end
----
The issue is generally due to NetVault file/directory access or locking. This includes locking by running processes or user permissions restrictions.
For instance:
- Either pgAdmin3.exe is running
- Or the pgsql directory is set as current directory on command prompt.
- Or a pgsql file is open
- Or the user executing the install does not have full control over the ..NetVault Backup\ folder, subfolders and newly created files and folders.
As part of the upgrade to 12, the initial phase is the PostgreSQL database major upgrade.
The installer is trying to restore the upgraded DB at the original location.
To upgrade the PostgreSQL database, the installer will first install the new version into the pgsql_new folder then will go through the following steps:
1. Delete pgsql installdir
2. Delete pgsql data directory
3. Rename pgsql_new to pgsql from installdir
4. Rename pgsql_new to pgsql from datadir
If any of the current pgsql files are locked or the user does not have full control over it, then the delete operation will fail and the rename from pgsql_new to pgsql won't be possible.
Depending on whether NetVault Backup is still operational or not, the first resolution phase will probably be to recover NetVault to the previous version.
This is done by un-installing NetVault and reinstalling the previous version using the same NetVault name and postgres user password.
Then adding the device hosting the NVDB backup taken before upgrade and restoring the NVDB.
Once the previous NV version is back up and running, before attempting the upgrade again, ensure the below points are checked:
This issue is mainly due to NetVault file/directory access or locking.
1) As mentioned in Installation guide:
- Before starting the upgrade procedure, close all other NetVault Backup applications, such as NetVault Configurator, Workstation Client, and PostgreSQL pgAdmin.
- If you have opened any configuration file, make sure that the file is closed before you start the upgrade procedure.
- On Windows, it may also be necessary to close Event Viewer before performing an upgrade.
- On Windows, close all the command prompts where any of the NetVault directories are browsed.
- Disable anti-virus software
2) Run the installer as local administrator:
If file locking is not an issue, the user running the upgrade may not have full control over the NetVault Backup folder and sub-folders, preventing the installer from deleting pgsql and renaming pgsql_new to pgsql.
Depending on the account used, on some volumes for instance, Domain Admins may not have full control over newly created items even if they had full control over the NetVault Backup folder and subfolders.
In which case, login in using the local Administrator account should resolve this issue.
The account running the installer should have full controll on all the NetVault directory structure and any newly created items on the same path.
If we still hit the same problem even after reinstall, then choose to reinstall as local administrator directly on C:\ for instance, in case the target volume has any special restrictions.