What is the Logaholic Datamanager?

Datamanager is only available in Logaholic 4.x.

From Logaholic version 4, it is no longer necessary to store all your data in a mysql database permanently.

When you run a report for the first time, the information is taken from the database and stored in a series of Logaholic datafiles on disk. These files are used and combined to create the actual reports you see on the screen. Once these files exist, Logaholic no longer needs to query the database to produce the information.

This means you can delete old data from your database, keeping it small and much faster. It also means reports in Logaholic load much faster than before, especially if your have a large site with lots of traffic.

The Datamanager takes care of this process for you automatically. Once a month, it will automatically kick into action when you update your statistics. It will automatically produce any datafiles that haven’t yet been created and clear the old information from the database. It also creates a backup of the information it removes from the database, so that if you need to go back to the source data for any given period, the information can be quickly reimported into the mysql database.


Setting Datamanager Options

Datamanager options can be set at the global level to define the settings all your profiles will use by default. You can also define Datamanager settings at the profile level, which will only apply to the selected profile.

To set global Datamanager options, go to Global Settings > Datamanager Settings

To set per profile Datamanager options, go to Edit Profile > Datamanager tab


Max daterange in Database

Maximum date range determines for what period of time Logaholic stores your data in the MySql database. If it is set to “No Limit”, all of your historical data will remain preserved in the database and the Datamanager feature will not run automatically.

If set to “1 Month” for example, Logaholic will keep the current month plus one month in the database. Remember, older information is retained in datafiles, it is not lost.

We recommend setting this to 1 month for high volume websites, and 3 months for smaller websites. 

Data directory

This is the directory on your server that Logaholic will use to store report datafiles and database backups.

To keep this directory safe we strongly recommend to place it outside your web site document root folder to prevent others from accessing the files via the web. If you do not place this folder outside your web root, the data files will be exposed to the internet.

Make sure that the “file permissions” are set so the web server can save files in this folder.

You might also need to add the data directory path to the “open_basedir” setting in your PHP.ini file if PHP is unable to read form the location you choose.

Maximum Log File storage size

Datamanager creates a backup of the data that it is going to remove from the database in archived files in the data directory (one per day). These archived log files have a custom Logaholic format and can not be imported in different software, but can be reimported by Logaholic extremely quickly. The default storage size is set to 5000MB. The storage size can be adjusted to your preferences and server capabilities. If the total size of archived files is greater than your max storage size, Logaholic will automatically start to delete archives (oldest files first) until the total size drops below your limit.

The information in these archives is only needed if you need to regenerate reporting information from the data source that is no longer in the mysql database. 

In practice you will probably never need to reimport information from these archives, but we recommend to keep about one year of archives on your disk, just in case you need to go back and generate some specific reports for a period further back that your ‘Max daterange in database’ setting. How many MB’s this is depends on your traffic levels.

Reimporting old data from archives

When trying to generate a report with a date range that has no datafiles and is not in the database; Logaholic looks into the data directory if there are archives for this date range. If so Logaholic automatically asks you if you would like to reimport this archive to the database. Keep in mind that if you run the datamanager again the data wil be removed from the database again after creating datafiles for it.

You can also reimport archives manually by going to: Edit Profile > Maintenance > Datamanager Setting and selecting the “Manually Export / Import Logfiles” checkbox.