Docs for all releases
Statistics rotation is the process of archiving active packages for a respective day and managing the database space.
With data constantly being added in the system, number of active packages in the database grows in size and requires management. An efficient way to reduce the size of your database is to regularly archive older packages (for example, annual packages).
During rotation process system dumps related day-statistics and saves it as a file (archived package), removing the statistical records from the database. Archived packages can be accessed at any time by restoring them from the file to database.
All processes related to rotation and restoration of the statistics packages are managed by the system service “Statistics Manager".
Moving or rotating the current day statistics package may result in errors! We strongly recommended not to do any operations on current day's package.
Rotate Statistics Automatically
By default, VCS archives items automatically on a regular interval. You can customize most of default settings. To do so you need to:
Go to the Configurations →Settings and find the "Auto-Rotation and Cleaning" sub-panel.
Specify the number of days in the "Statistics rotate delay" field (statistics, older than number of days specified, will be rotated).
Click the Update button.
Screenshot: Settings section/Auto-Rotation and Cleaning sub-panel
System manages the statistics packages in the background. 'Statistics Manager' system module must be activated to manage the packages!
Rotate Statistics Manually
You can also manually archive active packages, in addition to Automatic Statistics Rotation by VCS. Manual archiving provides flexibility, and allows you to specify exactly which days should be archived.
To manually archive active packages, do the following:
Go to the Statistics →Archive Management.
Select the period and tick respective checkboxes in the "Rotate package" column.
Click the Process button.
Screenshot: Archive Management section/Active statistics packages
After “Process” button is clicked, a respective statistics package will be rotated. The operation will be executed in the background. Then, you can find Archived packages in the archive (/var/archive folder in respect to VCS root). Also, it will be displayed in the Archived statistics packages sub-panel.
Restore Statistics Packages
To recover statistics from archives to the database, do the following:
Go to the Statistics →Archive Management.
Select the period in the Archived Statistics Packages sub-panel by ticking respective checkbox in the "Restore" column.
Click the Process button.
Screenshot: Archive Management section
Please note, while restoring old statistics packages check specified number of days in the "Statistics rotate delay" field (Settings section→ Auto-Rotation and Cleaning sub-panel). The Statistics rotate delay parameter should be greater than data of restoring package. Otherwise, the system will archive a restored package again.