When VCS detects that the metering database has been corrupted or has been accidently deleted outside VCS, it creates a backup of the database. The data available in memory is backed up and a message is logged, and administrative intervention is required to restore the database and reinstate metering and forecast.
The following log message will appear in the engine log:
The backup of metering database from in-memory data is created and saved in <path for metering database backup>. Administrative intervention required to use the backup database.
To restore the database for metering and forecast functionality
# /opt/VRTSvcs/bin/haagent -stop HostMonitor -force -sys system name
# rm /var/VRTSvcs/stats/.vcs_host_stats.data \ /var/VRTSvcs/stats/.vcs_host_stats.index
# cp /var/VRTSvcs/stats/.vcs_host_stats_bkup.data \ /var/VRTSvcs/stats/.vcs_host_stats.data
# cp /var/VRTSvcs/stats/.vcs_host_stats_bkup.index \ /var/VRTSvcs/stats/.vcs_host_stats.index
# /opt/VRTSvcs/bin/vcsstatlog --setprop \ /var/VRTSvcs/stats/.vcs_host_stats rate 120
# /opt/VRTSvcs/bin/vcsstatlog --setprop \ /var/VRTSvcs/stats/.vcs_host_stats compressto \ /var/VRTSvcs/stats/.vcs_host_stats_daily
# /opt/VRTSvcs/bin/vcsstatlog --setprop \ /var/VRTSvcs/stats/.vcs_host_stats compressmode avg
# /opt/VRTSvcs/bin/vcsstatlog --setprop \ /var/VRTSvcs/stats/.vcs_host_stats compressfreq 24h
# /opt/VRTSvcs/bin/haagent -start HostMonitor -sys system name