FWIW, my idea worked! I did the following on my old server:
- cd to the directory with my php data files (/var/lib in my case)
- Dump my database: mysqldump -u emoncms -p -r emoncms.sql emoncms
- Copy emonhub.conf and settings.ini from the pi: scp pi@emonpi:/opt/openenergymonitor/emonhub/conf/emonhub.conf . && scp pi@emonpi:/var/www/emoncms/settings.ini .
- Create the backup tar: tar zcvf /tmp/emoncms-oldserver-2021-06-28.tar.gz emoncms.sql emonhub.conf settings.ini phpfi* phptimeseries/
I just need to make sure everything is working, then I can do this again and point my collector (btmon) at the new server.
1 Like