How to re-create gravity.db, if deleted?

I didnt realise that there's a built in backup solution, so I backed up gravity.db file, then formatted my raspberry pi.

Expected Behaviour:

I'd put an adlist or whitelist and it'd be added.

Actual Behaviour:

After installing pi and putting the old gravity.db file back, I did get my adlists back, but can't
add blocklists or whitelists anymore it says "Attempt to write a readonly database

So, I deleted the gravity.db file made a backup using the Teleporter and restarted hoping that pihole will make the gravity.db file with whatever permissions it needs. But it didn't.

Debug Token:

https://tricorder.pi-hole.net/7OuXBjur/

Can I just reset pihole?
Thanks

What is the output of the following:

ls -lha /etc/pihole/*.db

-rw-rw-r-- 1 pihole pihole    0 Aug  8 20:47 /etc/pihole/gravity.db
-rw-r--r-- 1 pihole pihole 2.6M Aug  8 14:55 /etc/pihole/macvendor.db
-rw-r--r-- 1 pihole pihole 432K Aug  8 21:22 /etc/pihole/pihole-FTL.db

Run pihole -g -r to recreate the database.

1 Like

It fixed it, thank you very much, I was thinking of reverting to old backup, saved a ton of work :slight_smile:

1 Like

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