To erase/repair all or some data from analytics/search, you can use the following script:


$cd /opt/versa/scripts/van-scripts

Usage:

1. sudo ./vandb-manager.py action=delete startDate=<NdaysAgo|%Y-%m-%d> endDate=<NdaysAgo|%Y-%m-%d|now> intervalType=<hourly|daily|minute|all> [data=<security|SDWAN|all>] [tenants=<tenant1,...>] [host=<host1,...>] [quiet=true|false]

2. sudo ./vandb-manager.py action=truncate [data=<analytics|search|infodata|reporting|system|all>] [host=<host1,...>]

3. sudo ./vandb-manager.py action=repair

4. sudo ./vandb-manager.py action=auto



Example

Example1: To truncate all data irrespective of the date

 $sudo ./vandb-manager.py action=truncate data=all

To erase search data only (individual logs), use data=search

To erase all analytics data (sdwan and security), use data=analytics

To erase sdwan analytics data, use data=sdwan

To erase all security data (NGFW, SFW, TM, ...), use data=security

To erase reporting data, use data=reporting

To erase system monitoring data, use data=system

To erase info data (tenants, appliances, sites information, ...), use data=infodata

Note - To delete data for a specific tenant only, use action delete as described above.


Example2: To delete selective data for specific time period

To delete all hourly data for the last 30 days, use


  $sudo ./vandb-manager.py action=delete startDate=30daysAgo endDate=now quiet=false data=all intervalType=hourly


To delete all SDWAN data (daily and hourly) between 45 to 30 days (not older than 45 days and not newer than 30 days ago), use:


  $sudo ./vandb-manager.py action=delete startDate=45daysAgo endDate=30daysAgo quiet=false data=sdwan intervalType=all


Note 1 - startDate and endDate are mandatory. To delete the entire data, use truncate action.



Example3: To repair the analytics DB

$sudo ./vandb-manager.py action=repair