Blog
OpenEnergyMonitor

How to move feed data between servers

There is often a need to transfer large feed tables between different servers. Here is one way to do it via ssh that does not require downloading the data to a local machine. This makes it particularly fast especially if your local internet connection is relatively slow.

1) Login via ssh to the source server
ssh [email protected] (source server ip)

2) Export feed table from source instance database
mysqldump -u username -p database feed_1 > feed_1.sql

3) Transfer feed table via ssh to destination instance server
tar -cjvf - feed_1.sql | ssh [email protected] tar -xjf - -C /home/user (destination server ip)

4) Login via ssh to the destination server
ssh [email protected] (destination server ip)

5) Import feed table into destination instance database
mysql -u root -p database < feed_1.sql

It would be great to have some kind of utility within emoncms that makes it possible to move large feed tables between emoncms instances efficiently and easily without having to use terminal and ssh. If you know of an efficient way of doing this, advice would be most welcome. To engage in discussion regarding this post, please post on our Community Forum.