Trim feeds data?

Good morning

I have an 2016 emon system (emonpi, 2xTX, emonth) with six years worth of data (100+ feeds) on the current SD card which is looking about full.

I have purchased a new preloaded SD from the shop and am in the process of thinking how best to transfer over (with a bit of much needed cleaning up along the way).

The system is used for monitoring and control of a completely off-grid property and has become somewhat indispensable. Historical data is important for decision making on a daily basis as well as a useful tool for monitoring the health of individual bits of the off-grid set-up.

I had imagined I would simply have to download csv data to date for reviewing and start the new card with no history. However the trim data feature that has appeared at some point suggests I could trim the data before back-up to something smaller (say 2-3 years) and transfer over. I have found no confirmation of whether this actually works ok other than a couple of queries a few years ago questioning it.

Can anyone confirm it does work for my purposes and is this a sensible way to proceed anyway?

Current system info below.

Server Information

Server Information

Services

  • emonhub :- Active Running

  • emoncms_mqtt :- Active Running

  • feedwriter :- Active Running - sleep 300s 3645 feed points pending write

  • service-runner :- Active Running

  • emonPiLCD :- Active Running

  • redis-server :- Active Running

  • mosquitto :- Active Running

  • demandshaper :- Active Running

  • emoncms_sync :- Active Running

Emoncms

Server

  • CPU :- 1 Threads(s) | 4 Core(s) | 1 Sockets(s) | Cortex-A53 | 76.80MIPS |
  • OS :- Linux 4.19.75-v7+
  • Host :- emonpi | emonpi | (192.168.1.148)
  • Date :- 2026-02-09 11:39:21 UTC
  • Uptime :- 11:39:21 up 18:07, 0 users, load average: 0.39, 0.58, 0.54

Memory

  • RAM :- Used: 22.51%
    • Total :- 975.62 MB
    • Used :- 219.66 MB
    • Free :- 755.96 MB
  • Swap :- Used: 0.00%
    • Total :- 100 MB
    • Used :- 0 B
    • Free :- 100 MB

Disk

  • **** :- - / :- Used: 54.10%
    • Total :- 3.92 GB
    • Used :- 2.12 GB
    • Free :- 1.61 GB
    • Read Load :- 723.44 B/s
    • Write Load :- 1.37 KB/s
    • Load Time :- 17 hours 59 mins
  • /var/opt/emoncms :- Used: 98.48%
    • Total :- 9.98 GB
    • Used :- 9.83 GB
    • Free :- 0 B
    • Read Load :- 29.86 B/s
    • Write Load :- 552.68 B/s
    • Load Time :- 17 hours 59 mins
  • /boot :- Used: 20.55%
    • Total :- 252.05 MB
    • Used :- 51.79 MB
    • Free :- 200.26 MB
    • Read Load :- 0 B/s
    • Write Load :- 0 B/s
    • Load Time :- 17 hours 59 mins
  • /var/log :- Used: 25.50%
    • Total :- 50 MB
    • Used :- 12.75 MB
    • Free :- 37.25 MB
    • Read Load :- n/a
    • Write Load :- n/a
    • Load Time :- n/a

HTTP

  • Server :- Apache/2.4.38 (Raspbian) HTTP/1.1 CGI/1.1 80

MySQL

  • Version :- 5.5.5-10.3.17-MariaDB-0+deb10u1
  • Host :- 127.0.0.1 (127.0.0.1)
  • Date :- 2026-02-09 11:39:21 (UTC 00:00‌​)
  • Stats :- Uptime: 65241 Threads: 15 Questions: 81496 Slow queries: 0 Opens: 50 Flush tables: 1 Open tables: 44 Queries per second avg: 1.249

Redis

  • Version :-
    • Redis Server :- 5.0.3
    • PHP Redis :- 5.0.2
  • Host :- localhost:6379
  • Size :- 1085 keys (1.27M)
  • Uptime :- 0 days

MQTT Server

  • Version :- Mosquitto 1.5.7
  • Host :- localhost:1883 (127.0.0.1)

PHP

  • Version :- 7.3.9-1~deb10u1 (Zend Version 3.3.9)
  • Run user :- User: www-data Group: www-data video Script Owner: pi
  • Modules :- apache2handlercalendar Core ctype curl date dom v20031129exif fileinfo filter ftp gd gettext hash iconv json v1.7.0libxml mbstring mosquitto v0.4.0mysqli mysqlnd vmysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $openssl pcre PDO pdo_mysql Phar posix readline redis v5.0.2Reflection session shmop SimpleXML sockets sodium SPL standard sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter xsl Zend OPcache zlib

Pi

  • Model :- Raspberry Pi 3 Model B Rev 1.2 - 1GB (Sony UK)
  • Serial num. :- 5B0A1802
  • CPU Temperature :- 44.01°C
  • GPU Temperature :- 44.0°C
  • emonpiRelease :- emonSD-17Oct19
  • File-system :- read-write
Client Information

Client Information

HTTP

  • Browser :- Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36 Edg/144.0.0.0
  • Language :- en-GB,en;q=0.9,en-US;q=0.8

Window

  • Size :- 1375 x 635

Screen

  • Resolution :- 1536 x 864

Best way is to use the USB transfer method.

Update & Upgrade — OpenEnergyMonitor 0.0.1 documentation

You can Trim or Downsample the Feeds.

Trim is hidden under the Delete icon.

Yes the trim feed works and seems sensible way of doing it before you transfer the data.

As ever, backup first :slight_smile:

You might decide to keep the old SD as the backup, transfer the data (might take a while) the trim/downsample the data on the new system.

Thanks Brian

I have had a look at the trim feature and was unwilling to actually start doing anything before checking as I assumed a mistake or malfunction would lose that data. I will try it with a feed I no longer have use for - there are quite a few of those as my housekeeping is not that good.

Join the club.

I’d take a backup first, but as I say, if you are running out of space that may not work.

Doing the upgrade and transferring the information will means the old card will act as a backup and you can trim from there.

The data is just held as a text file & meta data file so restoring individual feeds is possible.