Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Delete a single days data?

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
Feek
Posts: 106
Joined: Sun 08 Jan 2012 9:22 pm
Weather Station: GW1003
Operating System: Raspbian
Location: Kirby Cross, Essex, UK
Contact:

Delete a single days data?

Post by Feek »

Hi,

I started Cumulus running late in the day last Thursday and so my "Low daily temp range" is currently showing just 0.5°C on that day with highest minimum and lowest maximum both being on the same day. I can't see that on a real day I'm ever going to get lower than that so I'd like to be able to remove that data.

I'm quite happy just to blitz the entire 12th November from the records.

I've tried going into Data logs / Dayfile, highlighting the 12th and hitting Delete, then confirming the delete but it doesn't actually disappear, even though it says success.

I'm using Cumulus MX 3.9.1 b on a Pi4.

Can anyone offer some advice please - Can I just edit /opt/CumulusMX/data/dayfile.txt and delete the first line which is for 12/11/2020 or is there more to it than that?

Thanks.
Feek
Posts: 106
Joined: Sun 08 Jan 2012 9:22 pm
Weather Station: GW1003
Operating System: Raspbian
Location: Kirby Cross, Essex, UK
Contact:

Re: Delete a single days data?

Post by Feek »

Alternatively, if I stop Cumulus and blitz the entire contents of /opt/CumulusMX/data and then restart Cumulus, will that safely completely erase all my history and start again from scratch?
freddie
Posts: 2434
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Delete a single days data?

Post by freddie »

Feek wrote: Tue 17 Nov 2020 9:52 am Alternatively, if I stop Cumulus and blitz the entire contents of /opt/CumulusMX/data and then restart Cumulus, will that safely completely erase all my history and start again from scratch?
You could do. It might be better (although a bit more longwinded) to do as you originally proposed and delete the entry from dayfile.txt. You would need to do this with Cumulus stopped. Also, you should edit the value next to "StartDate" in the [Station] section of Cumulus.ini to your new start date - also with Cumulus stopped. Finally, you may have to edit some of your records if any records were set on the day that you are removing. You do this via the admin interface, with Cumulus running, of course.
Freddie
Image
Feek
Posts: 106
Joined: Sun 08 Jan 2012 9:22 pm
Weather Station: GW1003
Operating System: Raspbian
Location: Kirby Cross, Essex, UK
Contact:

Re: Delete a single days data?

Post by Feek »

Thanks.

I have no problem losing a few days data in order to tidy things up.

One thing I've noticed, looking in Cumulus.ini - Even though I built this on the 12th November, the StartDate there is 31st October, is it worth changing that?

I was thinking to stop Cumulus running a few minutes before midnight, rename the data directory and create a new empty one (so I have a backup) and restart Cumulus at 00:01. That way I'll be starting first thing in the morning with a clean data set. I'm not sure what time the daily housekeeping tasks take place though so this may not update my records correctly until 24 hours later.
freddie
Posts: 2434
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Delete a single days data?

Post by freddie »

Sounds like a plan. I would change "StartDate" in Cumulus.ini to whatever the date will be when you decide to do the restart, as well.
Freddie
Image
User avatar
mcrossley
Posts: 12694
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Delete a single days data?

Post by mcrossley »

Starting at 00:01 with an empty data folder will give you a full days data. Some of Daily type records will not be set until the day rolls over the following midnight (assuming you are using midnight roll over). Likewise daily graphs will be effectively empty until you have at least two days data.
Feek
Posts: 106
Joined: Sun 08 Jan 2012 9:22 pm
Weather Station: GW1003
Operating System: Raspbian
Location: Kirby Cross, Essex, UK
Contact:

Re: Delete a single days data?

Post by Feek »

Thanks Mark.

I don't intend to be up at midnight, I'm going to stop the Cumulus service, edit Cumulus.ini with tomorrow as the start date and empty the data directory before I go to bed with a cron job set to reboot at 00:01 tomorrow morning. That should do the trick.

What could possibly go wrong? :D
Feek
Posts: 106
Joined: Sun 08 Jan 2012 9:22 pm
Weather Station: GW1003
Operating System: Raspbian
Location: Kirby Cross, Essex, UK
Contact:

Re: Delete a single days data?

Post by Feek »

All looking good so far, thanks for the help.

/edit (19/11/2020) - Yes, I can confirm this is all good.
Post Reply