WORKAROUND 1
For version 9.2 and below.
Remove the tapes in question from the Media database. To remove the tapes from the media database the tapes must be “offline”. If the tapes are in the tape library, do an “open door”, this will make the tape library in an “offline” state.
Run the “Nvmeddbcheck” command. See Knowledge Base Article 79428 titled “How to use the nvmeddbcheck utility to check and compact the media database”.
If unable to repair the NetVault Media Database, then you will need to replace the Media Database, See Knowledge Base Article 81938, titled “Creating a new Media database on an existing NetVault server”
Re-scan the tapes that were deleted.
WORKAROUND 2
For version 10 and above.
To re-build the media manger database .
Before starting make sure to have NVDB backup , stop NetValt services
1. Go to <NetVault Home>/pgsql/bin and launch pgAdmin3.exe
2. Go to File menu and select add server option
3. Fill Name field with anything, Host => localhost, Port => <Value given during installation, default 51486>, UserName => postgres, Password => <Given to postgres during NetVault Installation> and then click on OK button.
4. Expand the newly added server.
5. drop netvault_mediamanagement;
6. exit Pgadmin3.exe
7. rename c:\Program Files (x86)\Quest software\NetVault Backup\db\MediaDatabase c:\Program Files (x86)\Quest software\NetVault Backup\db\MediaDatabase_old
8.Now start services and run a test backup .
9.Post all the scan , please re-run the restore from GUI or the below command line as below
c:\Program Files (x86)\Quest software\NetVault Backup\util>nvrestore -list
To restore a folder from the saveset:
c:\Program Files (x86)\Quest Software\NetVault Backup\util>nvrestore -create 129 -title testrestore -path "C:\ProgramData\Dell\DR\log" -relocate C:\test -run
where "-create 129" is the saveset number, "-path" is the item to restore, and "-relocate" the target location to restore to.
For Linux
1>cd /usr/local/bin/netvault/pgsql/bin
./psql -h localhost -U postgres -p 51486
2>enter the passowrd then run the below command .
drop database netvault_mediamanagement;
Syntax : drop database database_name
3>exit from pgsql
4> post which move the below database files as well
mv /usr/<Netvault Home>/netvault/db/MediaDatabase /usr/<Netvault Home>/netvault/db/MediaDatabase_old
5>Now start services and run a test backup .
6>post which you will need to scan all tapes and media .
7>Post all the scan , please re-run the restore from GUI or from command line as below
cd /usr/<netvault home>/netvault/bin
To restore a folder from the saveset:
/usr/<netvault home> /bin/netvault/bin >./nvrestore -create 129 -title testrestore -path "/usr/local" -relocate "/tmp" -run
where "-create 129" is the saveset number, "-path" is the item to restore, and "-relocate" the target location to restore to.