Imperva Cyber Community

Convert Bulk MPRV (not encrypted DB audit) files to CSV files 

10-14-2019 10:50

This bash script converts previously exported but not encrypted DB Audit files to CSV format like described in KB article which can be reached via link

- create /var/tmp/audit/ folder (you need to copy archived files to this folder as bulk) on related MX
- create /var/tmp/csv/ folder (converted files will be stored here) on related MX

1. Copy the script to MX server
2. Copy the archive files to /var/tmp/audit/ folder of related MX. (archive files should not be stored in subfolders)
3. Run the script "./"

Note: If you logout while script running, it will be interrupted, you should run it with nohup command

4. After all of the archive files exported, you can find CSV files under "/var/tmp/csv/<audit_archive_filename>/" subfolders

Note: If the audit archives are encrypted or signed, this article may help:

0 Favorited
1 Files
zip file   572B   1 version
Uploaded - 10-14-2019
compressed file of "" script

Tags and Keywords


12-19-2019 06:49

As we saw, files converts in more csv.
Is there a method to generate a single csv files complete with all data?

Thank you

10-15-2019 03:31

That's a nice little script, well done!

It's also nice that there is scope for improvement, you could add error checking/handling, and the ability to handle encrypted files in the same script, but it's a nice simple implementation of the mechanism in the KB article.

Kudos to you!

Related Entries and Links

No Related Resource entered.