Community
OpenEnergyMonitor

OpenEnergyMonitor Community

Auto Backup options

Was wondering what options there might be for scheduling an auto backup to happen once a week and then upload it to say Google Drive or other options? Is such a think in planned development to add to the EmonCMS side under the backup tab?

If you search the forum, you will find a couple of suggestions. You can run the backup script via cron and then rsync the files to an external drive for instance relatively easily. There are also python scripts I think to save to Google.

Seen some mention Node Red. Not sure if that could do it or even automate the upload and backup scripts.

To continue on this a bit. Rather than Google Drive, how about a USB SD Card where once a week a backup is created and then saved to that USB SD Card. Keeps only 2 files overwriting the oldest one.

As I said before, you can just run the emoncms backup script to create the backup file. You would need to write a small script to run the backup, move/copy the file to an external drive and write a small bit of code to delete the oldest files (bound to be examples on stackexchange if you search).

Then just run that script from cron on a daily/weekly basis.