reef pi reset database

Free Phyto Promo
Spend $39+ → free 16oz Phyto · Use code FREEPHYTO at checkout · $16.99 value · Densest 6-species blend · Free shipping on every order · 100% live arrival guaranteed Spend $39+ → free 16oz Phyto · Use code FREEPHYTO at checkout · $16.99 value · Densest 6-species blend · Free shipping on every order · 100% live arrival guaranteed
Shop Now Code: FREEPHYTO

waterwombat

New Member
View Badges
Joined
Mar 9, 2023
Messages
2
Reaction score
3
Location
Melbourne
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
 

ColoredRock

Well-Known Member
View Badges
Joined
Aug 9, 2021
Messages
856
Reaction score
976
Location
Murrieta, CA (North of San Diego)
Rating - 0%
0   0   0

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,015
Reaction score
943
Location
Germany
Rating - 0%
0   0   0

ColoredRock

Well-Known Member
View Badges
Joined
Aug 9, 2021
Messages
856
Reaction score
976
Location
Murrieta, CA (North of San Diego)
Rating - 0%
0   0   0
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.
 

ColoredRock

Well-Known Member
View Badges
Joined
Aug 9, 2021
Messages
856
Reaction score
976
Location
Murrieta, CA (North of San Diego)
Rating - 0%
0   0   0
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.
 

ColoredRock

Well-Known Member
View Badges
Joined
Aug 9, 2021
Messages
856
Reaction score
976
Location
Murrieta, CA (North of San Diego)
Rating - 0%
0   0   0
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.
 
OP
OP
waterwombat

waterwombat

New Member
View Badges
Joined
Mar 9, 2023
Messages
2
Reaction score
3
Location
Melbourne
Rating - 0%
0   0   0
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.
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
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 :-/
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Unfortunately, in my case the historical data of ph as well as temperature were not deleted... :-(
Do you still need help with this ?
 

Litserv

Community Member
View Badges
Joined
May 3, 2020
Messages
62
Reaction score
54
Rating - 0%
0   0   0
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...
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
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
 

TOP 10 Trending Threads

WHAT AMOUNT OF LIVE ROCK AND SAND SHOULD BE PRIORITIZED FOR OPTIMAL BIODIVERSITY/FILTRATION?

  • 100% live rock + bagged sand

    Votes: 38 27.3%
  • 100% dry rock + 100% live sand

    Votes: 47 33.8%
  • 50/50 live/dry rock, 50/50 live/bagged sand

    Votes: 30 21.6%
  • 75% live rock, 25% live sand

    Votes: 14 10.1%
  • 25% live rock, 75% live sand

    Votes: 10 7.2%
Back
Top