How do I fix this mistake I make? Entry in WRONG table

I got a bit carried away and pasted regex stuff to block in the wrong list.

So when I updated Pihole, it threw these messages at me.

So now when I try to get to the Groups it gives me this error:

An unknown error occurred while loading the data.
{"error":{"key":"database_error","message":"Could not read domains from database table","hint":"Database not available"},"took":0.00081777572631835938}

And the groups list doesn't display.

Log here:
https://tricorder.pi-hole.net/49jsf5ux/

Probably deleting gravity database and starting from scratch is the best action here.

I suggest that you make teleporter backup every time you decide to mess with the database, so you can easily restore later.

1 Like

So delete the gravity database.

As in....
/etc/pihole/gravity.db
on that machine?

And would I have to restart pihole, or will it see this change and basically do it anyway?

mv /etc/pihole/gravity.db /etc/pihole/gravity.db.deleted
pihole -g

Restart should not be necessary as the last command will invoke the reload.

Ok, thanks.

Done.

Rebuilding list.

Now if I am wanting to add these regexx entries...

They go in the DOMAINS part and I enter them in there.

eg:
(\.|^)facebook\.com$

Are you entering those through the web UI or directly into the database?

Pretty sure the web UI should prevent you from entering invalid entries in the wrong place like you did before.

Messing with the database directly is usually a bad idea, avoid it unless necessary.

Via the GUI....

Copy/paste from a list.

PAINFUL, but.....

And that is how I did it before....
I was just on the wrong page.

So, sorry, no credit there.

Can I copy multiple lines and paste them or is it definitely one line at a time?

Domains page has this note visible below the input field:

You can add multiple entries at once by separating them with spaces (e.g. example.com example.org).

No idea if it applies to regex entries since it isn't explicitly mentioned.

1 Like

Again: Thanks.

I know I'm not good at this.

I don't know what is happening this end and as bad as it is for you: think how bad it is for me.

All is now good, I hope.

Things seem to be working.

I'll leave you alone with this thread.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.