Community
OpenEnergyMonitor

OpenEnergyMonitor Community

Export data feed from 9.7 | 2016.05.25 (web hosted) to newer PI-hosted version

Tags: #<Tag:0x00007fc9b1a385b8> #<Tag:0x00007fc9b1a38428> #<Tag:0x00007fc9b1a38248> #<Tag:0x00007fc9b1a380b8>

Hi to everyone :slight_smile:
I have an old version 9.7 | 2016.05.25 hosted on altervista since 2016 and now I would like to export some data feed to a newer version (pi-local).
I don’t have backup section but I can access via FTP to directories data.
How can I migrate my feed? :frowning:

Hello @Ale_Colo you could try the USB import tool documented here to import the old data, this is designed to work with older images and pull in the right files: https://guide.openenergymonitor.org/setup/update/#upgrading-to-a-new-emonsd-image

Hi TrystanLea, I’m very glad to read your answer :slight_smile:
I don’t have an sd card because it’s hosted to altervista provider.
I have access via web or FTP.
Via ftp all feed datas are stored in files called phpfinaxx.dat and phpfiwaxx.dat.
I can export my feeds data via EmonCMS webUI in CSV format.
Is there any solution?

Thank you
Alessandro from Italy

Hello @Ale_Colo

Assuming your local system is based on the latest emonSD image, here are the main steps I think:

You can copy the phpfina and phpfiwa folders to your Pi, place them in /var/opt/emoncms/phpfina and /var/opt/emoncms/phpfiwa.

Then export your MYSQL database and import in place of the database on the pi. These are the steps to take on the pi itself (not the export part!):

mysql -u emoncms -p emoncms (password: emonpiemoncmsmysql2016)
DROP DATABASE emoncms;
CREATE DATABASE emoncms; 
mysql -u emoncms -p emoncms < import-database-name.sql

Update the database:

php /opt/openenergymonitor/EmonScripts/common/emoncmsdbupdate.php

You might be able to manually run the export script https://github.com/emoncms/backup. You will need to edit the config file I suspect.