How to recover accounting data

Abiquo accounting process summary

The Abiquo accounting system stores all data in accounting_event_"resource" database tables, where "resource" is a resource name, for example, account_event_vm. These are the master accounting tables and you must back them up to avoid data loss.  The accounting and billing systems display and use accounting data from the  accounting_event_detail  table. You can replicate this table to improve system performance, especially when you have large amounts of accounting data or need to provide frequent access to this data.

Abiquo configures the abiquo-accounting cron job. This job runs UpdateAccounting to get resource data from the accounting_event_"resource" database tables and store it in the accounting_event_detail table.

The Abiquo Accounting system will automatically recover missed accounting periods in the accounting_event_detail table.

Control automatic recovery

You can control the amount of data to recover automatically in order to protect system performance.

If the cron job or the accounting process did not run for some time, when you next run the accounting process, automatic recovery will start. Automatic recovery means that the accounting process will detect the last hour of data that it processed and continue from that point.

When automatic recovery runs, to protect system performance, by default Abiquo will auto-recover up to 24 accounting periods per cron job run. This means that with the default settings, it will recover up to 24 hours worth of data each time the cron job runs, for example, one day's worth of data per hour.

You can set the  MaximumPeriodstoProcess parameter in kinton_accounting.accounting_parameters to control the recovery process. The default value is 24, and if you are using all default settings, this will process 1 day of accounting data per call.
The minimum number of periods to process is 1, and the maximum is 720. If you set a value outside of this range, the system will use the default value of 24.

Manual recovery

If for some reason automatic recovery cannot be used, it is possible to manually run a stored procedure to recover accounting event detail data. Please contact Abiquo Support for assistance.

Start a new accounting event detail table

If the accounting_event_detail table is empty, you can set the  MaximumPeriodsToFirstInit  parameter in kinton_accounting.accounting_parameters to control how many previous accounting periods Abiquo will recover accounting data for. By default, a system with an empty table will start from "now".  This value can be set to ensure that data accounting is generated for any previous number of hours, days, weeks, or months, depending on the account period size. The minimum number of periods to initialise is 1, and the maximum is 720. If you set a value outside of this range, the system will use the default value of 1.

Copyright © 2006-2024, Abiquo Holdings SL. All rights reserved