HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Tips/Tricks/Mods (http://www.howtoforge.com/forums/forumdisplay.php?f=29)
-   -   importing awstats data (http://www.howtoforge.com/forums/showthread.php?t=58213)

Justin Albstmeijer 8th August 2012 21:02

importing awstats data
 
Hi,

I moved a website to an ispconfig3 based setup.
Now I hoped to just copy over the old awstats data files and re-genarate the static pages to be included by /stats/index.php

But is keeps only showing the current month in the "Jump to previous stats:" selection.

This is what I did to regenerate the January stats of this year:

awstats_buildstaticpages.pl -year=2012 -month=01 -config=website.ext -awstatsprog=/var/www/awstats/awstats.pl -builddate=2012-01 -dir=/var/www/website.ext/web/stats/

It created the static files of January with an index at

/stats/awstats.website.ext.2012-01.html

But /stats/index.php still only shows me the option to select 2012-08 (this month).

What am I missing? Do I need to rename the output files?

Thank you in advance.

Justin Albstmeijer 10th August 2012 00:37

Eventually I found the stats of the previous months should each reside in a separate folder.

For example, the index of July should be:

/var/www/website.ext/web/stats/2012-7/awsindex.html

so to import the previous months, based on existing awstats data, I did:

year=2012
site=website.ext

for month in 1 2 3 4 5 6 7; do
mkdir -p /var/www/$site/web/stats/$year-$month
awstats_buildstaticpages.pl -year=$year -month=$month -config=$site -awstatsprog=/var/www/awstats/awstats.pl -dir=/var/www/$site/web/stats/$year-$month
cp /var/www/$site/web/stats/$year-$month/awstats.$site.html /var/www/$site/web/stats/$year-$month/awsindex.html
done


All times are GMT +2. The time now is 19:25.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.