Migrating data between local Emoncms installations

I’m currently running Emoncms 9.9.8 on a local Ubuntu 18.04 VM. The Emoncms install is unfortunately quite messy and Ubuntu is running slow in the VM, so I decided to migrate to XUbuntu 18.04 and do a clean Emoncms install. I have now created the new VM, everything is running nicely and I now want to migrate data etc.

Preferably I would like to use the sync functionality, but PHP redis does no longer work on the old install after I updated from emoncms 9.x to 9.8. When running

sudo tail /var/log/apache2/error.log

I get:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/redis.so' - /usr/lib/php/20151012/redis.so: cannot open shared object file: No such file or directory in Unknown on line 0
[Tue Mar 05 00:06:12.664384 2019] [mpm_prefork:notice] [pid 1023] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations
[Tue Mar 05 00:06:12.664445 2019] [core:notice] [pid 1023] AH00094: Command line: '/usr/sbin/apache2'
[Tue Mar 05 00:06:12.689951 2019] [:error] [pid 3293] avahi_entry_group_add_service_strlst("localhost") failed: Invalid host name

I can see redis.so is in an other library; ‘/usr/lib/php/20170718/’ , so obviously something is not right :slight_smile: I tried different redis version, but no luck.

So I decided to use the backup script in Usefulscripts in stead. This worked very nicely, and all the data transferred to the new VM - but they do not populate the Feed-list. I’ve tried creating a new feed, and that works OK and the data file is saved next to the transferred files. Any special tricks needed to get the old feed to populate the feed list?

Hello @Lykke, did you have $link_to_local_emoncms set to true? If the feeds where created but dont appear in the list it might be worth flushing redis:

Assuming you have no other applications using redis on your system you can run $ redis-cli flushall

Double checked, $link_to_local_emoncms was set to true.

I flushed redis and rebooted the computer for good measure, but still only the one test feed in the feed list.

Do I need to enable any of these?:

$mysqli=false
$redis=false

Is there a way to manually get emoncms to find the transferred feeds?

I’m not sure how emoncms works, so I copied the mysql database from the old installation and loaded it in the mysql in the new install. Feeds are still not showing - so guess I’ll have to roll it back.

Otherwise the new install works very well, I even got the dashboards and multigraps showing and they are able to find the feeds transferred by the backup script.

OK - got it to work. Not sure what did it, I was trying to get the sync-module to sync with an old backup copy - and suddenly all inputs, process lists and feeds appeared.

1 Like

Are you using MySQL for the data feed storage method?

I’m trying to make a clean VM install of stock Emoncms and to migrate my data from an old install with many workarounds. As I understand it, MySQL is used as to keep track of and store the feed data.

Even though my VM is working now, I still think there is something not right with the install. I therefore decided to switch the VM operating system from Xubuntu to Raspbian Strech (https://www.raspberrypi.org/downloads/raspberry-pi-desktop/). Emoncms was developed for Raspbian and it seems to install without any glitches. On top, Raspbian does the job and uses much less resources than Ubuntu.

I run Emoncms very successfully on a DietPi VM. Very few ‘workarounds’ required and is uses far less resource than Raspbian.

1 Like

Thanks, I may just try that.

1 Like