2.3: temporarily removing data to be loaded back later


#1

Hi,

We are on version 2.3. Right now, we run the log file analysis scripts once a day. My questions is if I want to backup all
the data this script generates, dump it to a mysql file, then delete all that data so that I can “start” as if I had never run
the script, do some testing, then delete that data, then reload the original data so that it is as if I had never done all this :-),
what tables should I backup, delete, recreate?

Here are the tables (from show tables):

piwik_access ?
piwik_archive_blob_2010_01 backup/delete/restore
piwik_archive_blob_2011_01 backup/delete/restore
piwik_archive_blob_2012_01 backup/delete/restore
piwik_archive_blob_2012_02 backup/delete/restore
piwik_archive_blob_2012_03 backup/delete/restore
piwik_archive_blob_2012_04 backup/delete/restore
piwik_archive_blob_2012_05 backup/delete/restore
piwik_archive_blob_2012_06 backup/delete/restore
piwik_archive_blob_2012_07 backup/delete/restore
piwik_archive_blob_2012_08 backup/delete/restore
piwik_archive_blob_2012_09 backup/delete/restore
piwik_archive_blob_2012_10 backup/delete/restore
piwik_archive_blob_2012_11 backup/delete/restore
piwik_archive_blob_2012_12 backup/delete/restore
piwik_archive_blob_2013_01 backup/delete/restore
piwik_archive_blob_2013_02 backup/delete/restore
piwik_archive_blob_2013_03 backup/delete/restore
piwik_archive_blob_2013_04 backup/delete/restore
piwik_archive_blob_2013_05 backup/delete/restore
piwik_archive_blob_2013_06 backup/delete/restore
piwik_archive_blob_2013_07 backup/delete/restore
piwik_archive_blob_2013_08 backup/delete/restore
piwik_archive_blob_2013_09 backup/delete/restore
piwik_archive_blob_2013_10 backup/delete/restore
piwik_archive_blob_2013_11 backup/delete/restore
piwik_archive_blob_2013_12 backup/delete/restore
piwik_archive_blob_2014_01 backup/delete/restore
piwik_archive_blob_2014_02 backup/delete/restore
piwik_archive_blob_2014_03 backup/delete/restore
piwik_archive_blob_2014_04 backup/delete/restore
piwik_archive_blob_2014_05 backup/delete/restore
piwik_archive_blob_2014_06 backup/delete/restore
piwik_archive_blob_2014_07 backup/delete/restore
piwik_archive_numeric_2010_01 backup/delete/restore
piwik_archive_numeric_2011_01 backup/delete/restore
piwik_archive_numeric_2012_01 backup/delete/restore
piwik_archive_numeric_2012_02 backup/delete/restore
piwik_archive_numeric_2012_03 backup/delete/restore
piwik_archive_numeric_2012_04 backup/delete/restore
piwik_archive_numeric_2012_05 backup/delete/restore
piwik_archive_numeric_2012_06 backup/delete/restore
piwik_archive_numeric_2012_07 backup/delete/restore
piwik_archive_numeric_2012_08 backup/delete/restore
piwik_archive_numeric_2012_09 backup/delete/restore
piwik_archive_numeric_2012_10 backup/delete/restore
piwik_archive_numeric_2012_11 backup/delete/restore
piwik_archive_numeric_2012_12 backup/delete/restore
piwik_archive_numeric_2013_01 backup/delete/restore
piwik_archive_numeric_2013_02 backup/delete/restore
piwik_archive_numeric_2013_03 backup/delete/restore
piwik_archive_numeric_2013_04 backup/delete/restore
piwik_archive_numeric_2013_05 backup/delete/restore
piwik_archive_numeric_2013_06 backup/delete/restore
piwik_archive_numeric_2013_07 backup/delete/restore
piwik_archive_numeric_2013_08 backup/delete/restore
piwik_archive_numeric_2013_09 backup/delete/restore
piwik_archive_numeric_2013_10 backup/delete/restore
piwik_archive_numeric_2013_11 backup/delete/restore
piwik_archive_numeric_2013_12 backup/delete/restore
piwik_archive_numeric_2014_01 backup/delete/restore
piwik_archive_numeric_2014_02 backup/delete/restore
piwik_archive_numeric_2014_03 backup/delete/restore
piwik_archive_numeric_2014_04 backup/delete/restore
piwik_archive_numeric_2014_05 backup/delete/restore
piwik_archive_numeric_2014_06 backup/delete/restore
piwik_archive_numeric_2014_07 backup/delete/restore
piwik_goal ?
piwik_log_action ?
piwik_log_conversion ?
piwik_log_conversion_item ?
piwik_log_link_visit_action ?
piwik_log_profiling ?
piwik_log_visit ?
piwik_logger_message ?
piwik_option ?
piwik_report ?
piwik_segment ?
piwik_session ?
piwik_site ?
piwik_site_url ?
piwik_user don’t change
piwik_user_dashboard don’t change
piwik_user_language don’t change

I realize I would not want to do anything with the user tables, since I am only interested in resetting the usage
data. I am just not sure about the tables with ? at the end. I just want the db to basically be reset to the
beginning, but not change any user information. As I remember, when rebuilding the archive for a site, I
dropped the tables piwik_archive_numeric*, and delete from piwik_log_{visit,link_visit_action,conversion,
conversion_item} where id=thesitenumber. But, should I totally delete the information in these? What about
the others. I said above that the piwik_archive_blob ones I should backup/delete/restore, but at that time I
though that is what I did when I rebuilt the archives info. So I am not sure about them now…

Anyway, what should I do with each table (except user access for admins and list of websites) to:

  1. make it appear as if it was never used
  2. do my work with it
  3. restore it to before step 1

Note, there is no live updates (javascript) of the dbs, all is done via the archive method…

Thanks,
Douglas