The Problem: When running "Rebuild Archive Index" all footage is not fully restored (not visible on the Timeline).
If you've recently run "Rebuild Archive Index" and you notice that the Rebuilding process is taking too long or has completed but you do not see all footage on the Timeline - and you are certain that it exists on the storage location being re-indexed) then it's likely the archive you are trying to re-index has a corrupted database.
The Solution: Follow this guide to restore your missing footage and make your system more resilient against archive database corruption.
Step 1: Make your system more resilient. Do this before you restore your files or you might face the same problem again in the future.
- Make sure your archive files and directories are not moved or renamed. Any change in an active directory that Nx Witness is writing to without a corresponding change in the storage settings for a Server will cause an error.
- Make sure you have enough reserved space at storage drives. The likelihood of a corrupted database increases vastly when drives are overfull. To check the existing status of a drive's reserved space and increase reserved space if necessary please follow this guide.
Step 2: Restore Archives
1. Use the In-Client Upgrade (System Administration -> Updates) to update your system to the patch Nx Witness v2.6 Build 13867 or later.
- Build Number: 13867
- Password: ht3838
- All latest release versions and patches can be found here.
2. Once the upgrade is complete stop the Nx Witness Server.
- In Windows: Find the Nx Witness Server Tray Tool (in the lower right-hand side of your Windows Start bar or searchable from Start Menu) and choose "Stop Server"
- In Linux: Use Terminal command $sudo service networkoptix-mediaserver stop
3. Remove the corrupted database.
- In Windows: Use Windows Explorer to navigate to the directory for the affected archives. Look for a file that ends in _media.sqlite and delete it.
- In Linux: Navigate to each drive. Look for a file that ends in _media.sqlite and delete it.
- For NAS: If you are restoring a NAS device the database files will be stored in the /opt/networkoptix/mediaserver/var/storage_db/<storage_directory>
4. After you have removed the _media.sqlite files start the Nx Witness Server.
- In Windows: Find the Nx Witness Server Tray Tool (in the lower right-hand side of your Windows Start bar or searchable from Start Menu) and choose "Start Server"
- In Linux: Use Terminal command $sudo service networkoptix-mediaserver start
5. On the Nx Witness Client (while logged into the System as an Administrator) head to Server Settings -> Storage Management and press Rebuild Archive Index.
- During the Archive Rebuild is in progress Server will still be able to record and rewrite footage.
- When rebuilding is complete - which could take a significant amount of time depending on how large your existing archive is - you'll now have a clean, more reliable archive database and archive and all recorded video should now again be available in your Timeline.