The steps for handling the multiple duplicate tables are as follows.
IMPORTANT:
Before performing the below procedure, please take a backup of your ..NetVault Backup\db\pgsql folder, as well as a normal NVDB backup from the WebUI.
Please contact Support for further help with the below if required.
1. Ensure the "NetVault Process manager" service is stopped and "netvault-pgsql" service remains started
2. Launch <NetVault Home>\pgsql\bin\pgAdmin3.exe
3. Click the File menu and select Add Server
4. Fill the Name field with anything, Host = localhost, Port = 51486, UserName = postgres, Password => <used during NetVault Installation> and then click OK.
5. Expand the newly added server and browse Databases to select netvault_mediamanagement
6. Right click netvault_mediamanagement and select Backup , ensure the format is custom
7. Rename the existing "netvault_mediamanagement" database to "netvault_mediamanagement_org"
8. Create a new "netvault_mediamanagement" database
9. Restore the database dump taken in step #6 above , using pgAdmin3 > right click the new netvault_mediamanagement database and select Restore
The restore will show some errors and will finish with "Exit code 1"
In this scenario the errors will be shown as below, but it could be any table depending on which is corrupt.
Three errors will be shown for table retiredsegmentstreams, example of error for 1 such table is as below
-----
pg_restore: creating TABLE retiredsegmentstreams
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 305; 1259 17353 TABLE retiredsegmentstreams postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "retiredsegmentstreams" already exists
Command was: CREATE TABLE retiredsegmentstreams (
streamid bytea
);
-----
Three errors will be shown for table retiredsessions, example of error for 1 such table is as below
-------
pg_restore: creating TABLE retiredsessions
pg_restore: [archiver (db)] Error from TOC entry 299; 1259 17347 TABLE retiredsessions postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "retiredsessions" already exists
Command was: CREATE TABLE retiredsessions (
sessionid bytea,
sessionphase integer
);
-------
Click On "CANCEL" button of restore operation pop-up
10. Select "netvault_mediamanagement" database, and right click it, select "maintenance", then select "VACUUM" operation and "FULL" option and click OK
11. After "vacuum", again select "netvault_mediamanagement" database, and right click it, select "maintenance", then select "REINDEX" operation and click OK
12. Select "netvault_mediamanagement" database, and right click it, and select "Refresh"
13. Select and right click the old netvault_mediamanagement_org and select Delete/Drop, then Close all pgAdmin3 windows
14. Restart "netvault-pgsNetvault postgres database service" and then reboot the NVBU server.
15. Login to NVBU WebUI and check that its working fine.
16. You can now attempt the upgrade to NVBU 12.x