reef pi reset database

waterwombat

New Member
View Badges
Joined
Mar 9, 2023
Messages
2
Reaction score
3
Location
Melbourne
What state or country do you live in
Australia
Rating - 0%
0   0   0
Can I wipe the data history from my reef pi - currently just set up on a breadboard for testing with temp sesors and timers.
I'd like to wipe the cached historic data so that the dashbaord resets and only shows new data, how can I do this?
thanks
 
Wouldn't that removal of the database file, as described in the Troubleshooting Guide, also remove all settings, e.g. all pH sensors, etc. ?
Before you try that, I would definitely recommend to download a backup of that database.

Great question though, I was wondering the exact same thing !
God.. good catch.. I will blame lack of sleep for not seeing historical data.
 
im not at home to but searching I came up with.. (make sure you back up your database)



reef-pi db is a sub command that can update and retrieve data from the database. You can use it to delete data from specific buckets, which are collections of key-value pairs.

For example, if you want to delete all the data from the bucket named “temperature”, you can use this command:

reef-pi db delete -b temperature

You can also specify a key to delete only one element from a bucket.

For example, if you want to delete the element with the key “1” from the bucket named “ato”, you can use this command:

reef-pi db delete -b ato -k 1

You can find more information about reef-pi db and its options by using this command:

reef-pi db --help

Use at your own risk! this was an AI generated answer to a question.

Going to play with it when I can log into my pi.
 
I tried it on my test system...

Backed up my db
Loaded my backup to make sure it was good

Stop the reefpi service:
sudo systemctl stop reef-pi.service

Check status:
sudo systemctl status reef-pi.service

List buckets:
reef-pi db buckets

I removed my ph history.
sudo reef-pi db delete ph_readings 1

Started the service backup

sudo systemctl start reef-pi.service

Rebooted for good measure.

Historical ph is cleared.
 
Thanks for the responses - I was sort of hoping there was a "reset" option in the web interface, I think that would be a useful feature. looks like I'll have to sort out logging on to the raspi command line to do this.
 
Thanks for the responses - I was sort of hoping there was a "reset" option in the web interface, I think that would be a useful feature. looks like I'll have to sort out logging on to the raspi command line to do this.
Yes this will be a useful feature across all components (to reset sensor & usage data). Its on my wish list as well :-/
 
this was an AI generated answer to a question.
'-b' is not a valid parameter... (doesn't exist)
I got a lot of nonsense in different areas/topics (not only Reef-Pi) using AI... ;-)
 
Do you still need help with this ?

I couldn't solve this by myself. For the time being, I have to skip this, because I'm having vacation in some days... ;-)

But in general, a function to delete old recorded data would be nice...
 
I couldn't solve this by myself. For the time being, I have to skip this, because I'm having vacation in some days... ;-)

But in general, a function to delete old recorded data would be nice...
You should be able to do this with db subcommand, just delete the right element under usage bucket
 

HOW MUCH DOES A FISH’S FEEDING REQUIREMENTS AFFECT YOUR STOCKING DECISIONS?

  • A lot! - I avoid fish that require frequent or specialized feeding

    Votes: 20 33.3%
  • Quite a bit, but an automatic feeder can change my answer

    Votes: 8 13.3%
  • It depends on whether my nutrient export can handle it

    Votes: 9 15.0%
  • It depends on how badly I want the fish

    Votes: 12 20.0%
  • Not much. I’m willing to adjust my routine

    Votes: 9 15.0%
  • Not at all. Feeding demands don’t limit my stocking choices

    Votes: 10 16.7%
  • I usually learn about the demanding feeding schedule after buying the fish!

    Votes: 2 3.3%
  • I haven’t really considered this before

    Votes: 4 6.7%
  • Something else (see my comments in the thread)

    Votes: 2 3.3%
Back
Top
Home
Post thread…
Market
What's new