updata download sizes at mikrotik

Hi
I have a PC as a mikrotik router at home, and also i have many power failures because the electricity network is undergoing maintenance ant this may last for months, and I noticed that what it’s shown at the user profile is not updated instantly by the downloads(mega Bytes) at the active users, and after an electricity cut off, everything at the active user just resetted (I mean downloaded megabytes), and nothing is recorded.

How can I update it instantly or at least every hour, any ideas?

Several solutions to keep track of volatile data after a reboot:

Use a Radius server with accounting (data use will be automatically sent to the radius server and logged in database)
Use mikrotik API to query the “Mb used” from an external device and log it on a file.
Write a mikrotik script to query the data you need and log it into a file or on a non-volatile area (for example, comment on user)