Importing historic data

I have been running an Emoncms installation (v8.3.6) which contains data from 2013 and 2014 (stored in MySQL feeds). My current Emoncms installation (v9.7.1) is running feed logging the same value as the old one, but then in PHPTIMESERIES.

Is there some kind of script to run which allows me to export the data from the old installation and import it into the new installation in the same feed?

Did you manage to solve this @fversteegen ?

I have a similar situation. I had an old emoncms installation that I had to shutdown. However I have a copy (just filezilla not using the backup function) of the .dat and .meta files, as well as the rest of the directory structure.

I’d like to be able to import this historic data into my new emoncms set up.

Any pointers from you or anyone else appreciated


@mking007 how far are you with your new installation? do you have the original emoncms mysql database backup? Could you start from the old database?

@TrystanLea I’ve only set up the new emoncms installation over the weekend, so it’s brand new and pretty empty.

However I’m no mysql expert. I didn’t export the original DB it explicitly if that’s necessary. I didn’t have the backup module then I think. I just copied all my old directory structure for emoncmsdata and emoncms with, I think, a standard build in a hosted environment.

So is it possible to copy and paste files in to re-create the old data?

if you have old PHPFina data files but not the mysql database, you could create a number of blank feeds in your new installation, locate your new phpfina data directory and then replace the new 1.dat and 1.meta say with the old 1.dat and 1.meta. It may be quite labourious if you have a lot of feeds but it should work.

If you have the old mysql database and are able to get this up and running then it should then be able to load your old feeds…

Thanks @TrystanLea.

I can’t get access to the old hosting site so can’t access the mysql DB, but I will try the other option.

Do I just create a feed from any input and then replace the created X.dat and x.meta files?
Or do I use the “virtual feed” option on the feeds page

Yes create a feed using an input and select PHPFina as the feed engine, the interval doesnt matter as it will be overwritten. Once you’re done, you may need to adjust the permissions on the .dat files to allow emoncms to write to them.

But this approach wouldn’t allow you to move similar data into 1 feed wouldn’t it? I am looking for a way to import data into the current feeds which already have been running for several months.