Backup : Error: missing backup config.cfg


I have a custom install of emoncms on a Raspberry Pi 4.
It seems I recently had an SD card corruption problem… could solve it by reinstalling packages and files (the Pi could still boot).

Now, I would like to make a fresh install on a new SD card, but I want to save data first.
What is the best way ?

  1. Is the backup tool a good solution ?

Supposed yes, but from the tool bar, in menu, I get :
Error: missing backup config.cfg
This error message was already here before SD card problems.

  1. How can I solve this ?

  2. Is there a better way to save data (to get them restored on a fresh install) ?

Here is my environment :

Thanks !

Hello @fonze do you wish to use a custom installation for your next install? or will you be using the EmonScripts installation scripts or downloading the emonSD image?

One option is to use the process described here to import the data from one SD card to another Import / Backup - Guide | OpenEnergyMonitor.

Or alternatively you could probably fix that error by creating the backup.cfg from default.config.cfg backup/default.config.cfg at master · emoncms/backup · GitHub.

The standard configuration on an emonSD image is:

# Emoncms Export and Import scripts config file


# These settings are used for both the export and import scripts.
# To export from one location and import into another
# Used by both PHP and Bash and comments are not ignored

# Change all capitalised placeholders to relevant locations

# user


# Directory location of Emoncms

# Destination location of exported backup .tar.gz - Must be writable

# location of phpfina phpfiwa and phptimeseries databases

# Location of emonhub.conf - leave blank if backup not required

# Location of specimen emonhub config

# Location of compressed backup data to import .tar.gz

Hello @TrystanLea,

Thanks for the help !

The only reason I did a custom install is I wanted emoncms hosted as a subsite (i.e., and also host some other simple websites (for example a small Wordpress website - php and mysql) on the same Pi.

Of course, installation scripts or downloading the emonSD image would be easier to get emoncms working for me.
But would the http server part be easily configurable to get multiples simple websites on the same install ? Or is this a bad idea ?

By default EmonCMS is installed to /var/www/emoncms so it will just be a case of you adjusting your Apache2 Virtual Host configuration to suit your local needs. You may also need to adjust the .htaccess in the emoncms root folder.

Don’t ask me how, I just know it is possible to do :slight_smile: