# Importing historic data from .csv file onto fresh Emoncms

**URL:** <https://community.openenergymonitor.org/t/importing-historic-data-from-csv-file-onto-fresh-emoncms/10645>\
**Category:** Emoncms\
**Created:** [10 April 2019 12:29 UTC](https://community.openenergymonitor.org/t/importing-historic-data-from-csv-file-onto-fresh-emoncms/10645 "2019-04-10T12:29:51Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![djh](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/d/e36b37/32.png) [@djh](https://community.openenergymonitor.org/u/djh)\
**Post date:** [11 April 2019 11:34 UTC](https://community.openenergymonitor.org/t/importing-historic-data-from-csv-file-onto-fresh-emoncms/10645/11 "2019-04-11T11:34:45Z")

</div>

> [@DaveBlake](#):
>
> I have found the export facility that creates .csv files of the feeds, but looking through the useful scripts I don’t see anything to help import any data exported in that way.
> 
> I’m hoping someone can point me at something that does it. I have my Emonpi running again, and can SSH in as I wanted, but I so miss seeing the 3 years of historic data I wiped off.

I don’t think there’s any particularly easy way to do it. I hope somebody who knows better can come along and tell me I’m wrong.

AIUI, the system originally kept data in a mysql database, but then discovered that doing so loaded a pi excessively and wore out the SD card in a very short time. So they moved to a system of open format flat files, with an in-memory buffer. I asked a similar question a while ago and got a discouraging reply. [Importing data to an emoncms system](https://community.openenergymonitor.org/t/importing-data-to-an-emoncms-system/9899)

I’ve thought about writing a program to input historical data, and then I thought about writing a new file format that would make such things easier, and I imported the system onto the machine I use for development but have never got it to run because the system is too closely linked to debian-based systems at present, and I lost motivation.

I just backup the data files on the system every day to an external backup disk using scp in a cron job. I hope that will be enough to restore my system if it ever dies. Doesn’t help in your current situation though, sorry.

---

_[View the full topic](https://community.openenergymonitor.org/t/importing-historic-data-from-csv-file-onto-fresh-emoncms/10645)._
