Save to directly rsync dbase? #2
shaderecker
started this conversation in
General
Replies: 2 comments 1 reply
-
Both rsync and the gravity pull could run at the same time which could result in tables still being in transition while the file already is being rsynced. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Finally came around to implement this in #7 😁 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@deHakkelaar brought this up in Discourse
I noticed you do a one on one
rsync
of the gravity dbase file:ansible-pihole/roles/sync/templates/pihole_sync.j2
Lines 5 to 12 in d6b2f53
Wouldn't that potentially also
rsync
the dbase file that might still be in transition performing someUPDATE
query or something else ?Isnt it safer to dump the dbase instead on the "primary" and copy the dump over to the "secondaries" eg:
sqlite3 /etc/pihole/gravity.db ".backup main gravity.db.dump"
And restore/import on the secondary hosts if checksum check (md5 or whatever) has changed with:
sudo -u pihole sqlite3 /etc/pihole/gravity.db ".restore main gravity.db.dump"
Would need to stop pihole-FTL to prevent tables being locked while importing.Beta Was this translation helpful? Give feedback.
All reactions