Has anyone moved sites along with their AWStats from a DirectAdmin box to a Virtualmin box?
I am trying to move the AWStats as well as the site. I haven’t been able to accomplish this and get the stats to work showing the migrated stats from the DirectAdmin AWStats files.
I think you’re saying restoring a DirectAdmin site that had AWStats configured in DirectAdmin, and stored reports, did not bring it over. Is that right?
Yes, exactly. In manually trying to move the stats from the DirectAdmin site I have not been able to make them work in the same site on the Virtualmin box. While related but different, how difficult can it be to read in a DirectAdmin backup and put the website’s data where it belongs in Virtualmin? Beyond my current capability but has anyone out there done this?
You are totally correct, Joe. I was looking in the wrong place. I was in Backup and Restore > Restore Virtual Servers > Restore Source where there is no DirectAdmin.
Thanks for clarifying this!
I did the process correctly this time with a small site that had AWStats in its DirectAdmin interface going back about 4 years. I changed the DNS to point it at the server I moved it to.
During the migration process it gave me a message that it could not migrate Webalizer which made sense. But it did not make any mention of AWStats. I went in to Edit Virtual Server and turned on AWStats and found it had no stats available. I suspect there may be a disconnect because Webalizer threw an error so it ignored AWStats?
In PHP the site in DirectAdmin was set to 7.4. Virtualmin migrated it setting it to 8.3 (7.4 is an option on my Virtualmin box along with all versions through 8.3).
In Virtualmin I turned off the “DNS domain enabled” and “Mail for domain enabled” as these were not used or turned on in DirectAdmin either.
Hope this is helpful towards whatever simple thing is causing the AWStats to be ignored on the migration.
Is there a manual about this? I tried this but it doens’t create a new server or user, even though it was busy importing the whole backup of about 1,5 gb.
Should I have created a new virtual server/user first with the same name?
No. The form asks you for the information it needs, and it creates everything for you.
If it didn’t do that, then it didn’t find a domain in the backup for some reason. It’s possible backup file format has changed, or there’s something unusual about your backup.
I found that for best results so far, I had to ensure the same settings existed in the Virtualmin box as on the DirectAdmin box:
Installed Webalizer on the Virtualmin box and enabled it in Virtualmin
Installed PHP 7.4 on the box as that was what the site to be migrated used
Set the DNS to the new box to avoid hanging while trying to set up SSL
Navigated to Add Servers > Migrate Virtual Server
Chose Source backup file: Upload to server (I downloaded it to my workstation from DirectAdmin)
Clicked on the attachment icon and selected my backup file
Chose Backup file type: DirectAdmin backup
For Username for domain I entered the existing username (although it did find this in my original attempts)
Entered the Password for administrator (hadn’t been able to work it out from backup in previous attempts)
Kept set to Yes for Create Webmin user?
Didn’t touch Prefix for mail usernames (no email hooked up on DirectAdmin as I run separate email servers for nearly all sites)
Added my Contact email address
Clicked on the Migrate Now button
Here was the output:
Uploading migration file root …
… uploaded 11.65 MiB
Validating migration file …
… done
Starting migration of access-80.com from uploaded file …
Checking for DirectAdmin features …
… found Home directory, Administration user, Apache website, Log file rotation, Webmin login, DNS domain, Webalizer reporting, Mail for domain, Apache SSL website .
Checking for clashes and dependencies …
… all OK
Creating initial virtual server access-80.com …
Saving server details …
… done
Creating administration group access80co …
… done
Creating administration user access80co …
… done
Creating aliases for administration user …
… done
Adding administration user to groups …
… done
Creating home directory …
… done
Creating mailbox for administration user …
… done
Adding new DNS zone …
… done
Adding to email domains list …
… done
Adding DKIM records to DNS domain access-80.com …
… added successfully
Adding new virtual website …
… done
Disabling CGI scripts support …
… done
Adding webserver user www-data to server’s group …
… done
Performing other Apache configuration …
… done
Setting up scheduled Webalizer reporting …
… done
Creating SSL certificate and private key …
… done
Adding new SSL virtual website …
… done
Setting up log file rotation …
… done
Creating Webmin user …
… done
Saving server details …
… done
Applying DNS zone for access-80.com …
… done
Re-starting DNS server …
… done
Applying webserver configuration …
… done
Restarting PHP-FPM 8.3 server …
… done
Re-loading Webmin …
… done
Re-starting Usermin …
… done
Restarting mail server …
… done
Updating Webmin user …
… done
Setting up initial SSL certificate …
… successfully requested Let’s Encrypt certificate for access-80.com, www.access-80.com
Re-loading Webmin …
… done
Restarting PHP-FPM 8.3 server …
… done
Applying webserver configuration …
… done
Re-starting Usermin …
… done
Restarting mail server …
… done
… done
Copying public_html directory …
… done
Copying private_html directory …
… done
Copying stats directory …
… done
Copying public_ftp directory …
… done
Copying and fixing DNS records …
… done
Re-creating mail users …
… done (migrated 0 users)
Copying email aliases …
… done (migrated 0 aliases)
Copying FTP users …
… done (migrated 0 users)
Restarting PHP-FPM 8.3 server …
… done
Applying webserver configuration …
… done
Re-starting DNS server …
… done
Successfully migrated access-80.com virtual server, click here to manage it.
I then checked in another browser page and the site appeared to resolve just fine. I then clicked to manage it.
Under Enabled features it had:
DNS domain enabled (checked) (I unchecked it as I use separate DNS servers)
Apache website enabled (checked)
MariaDB database enabled (not checked) (is an HTML site)
Mail for domain enabled (checked) (I unchecked it as I use separate mail servers)
Spam filtering enabled (unchecked)
Webalizer reporting enabled (checked) (and it brought in the DirectAdmin Webalizer files)
Webmin login enabled (checked)
AWStats reporting (unchecked) (and there were no AWStats files grabbed from the backup)
I suspect the script is skipping AWStats. However, I did have an indication AWStats failed in my first attempt to do this migration when Webalizer was not installed.
It ignored DirectAdmin’s PHP set at 7.4 despite that being present.
It ignored DirectAdmin’s mail settings as it was set to external on the DirectAdmin box.
It should be able to restore the SSL certificate from the backup as well, which would encourage testing a newly migrated site using a hosts file or similar mechanism before changing the actual DNS.
Well, I followed each step except for the webalizer. When clicking on the migrate button to upload my 1,4 gb file the browser shows a red line swinging left to right for some time, then it stops. No output, nothing running, zero.
AWStats reports are based on Apache logs, so you need to make sure those are also migrated; check /var/log/virtualmin directory. Additionally, AWStats may require you to re-generate reports manually after migration on the Manage Virtual Server ⇾ AWStats Configuration: Configure AWStats page.
I installed Webalizer (just had to install it in Debian 12 and it appeared as able to be activated in Virtualmin) thinking that because an error/warning was generated during the migration process indicating it, that Virtualmin’s migration process may have not even tried to bring over AWStats.
Each time I did the migration, the site on the Virtualmin box indicates AWStats is not active. When I go in and do that and regenerate, it does not recognize any of the previous stats. While I agree that AWStats reports are based on Apache logs, aren’t the past reports all contained in the HTML files that are accumulated over time in the AWStats files?
Does AWStats produce reports in static HTML? I though it was a Perl application that produced the reports on demand from a database generated from the logs. (But, it’s been a decade or more since I used it, so I may be misremembering.)