Updating AWStats when changing a domain
February 24, 2008
I recently had the need to update an awstats installation on a website. The website had not changed, but the domain name had. CNAME in place, I needed to move the statistical information over so that all of the previous history—three years of it—came with it.
A very simple UNIX command facilitated the move: rename.
awstats stores the records is a proprietary flat file database based on the domain name. Where the data is stored is configurable, so I won't detail this, it might be different for you.
I backed up the files in /tmp and executed the following rename command, in the directory storing the record files:
% rename newDomain oldDomain awstats*
Done.
Need awstats services? Email me, I'm always looking for a little extra cash.