Exporting just one site

Hi,

I have a Piwik installation which currently tracks five sites.

One of the sites was recently shut down and I’m trying to collect all usage data about that site for archival purposes. I’d like to extract all the information about visits to that site into a file, for example as a MySQL dump.

I know how to perform a full MySQL dump of the Piwik database. But I don’t know whether it’s possible/easy to make a MySQL dump that contains just the information about a single Piwik site. I don’t want data from other sites mixed into the same dump. Any ideas?

Thanks in advance,
Osma

You need the whole log_action table and all other tables filtered by the site ID. Alternatively, you can use this plugin to migrate a single site and then do the dump.

Hi,
to dump only specific idsite you can use mysqldump with --where option or select into outfile e.g.

select * into outfile '/tmp/idsite.csv' FIELDS TERMINATED BY '\t' OPTIONALLY ENCLOSED BY '\"' ESCAPED BY '' LINES TERMINATED BY '\n' from piwik_log_visit where idsite='number';