Allow SQLite to be defined as URL / with paramters #339

Closed
opened 2025-12-29 01:27:18 +01:00 by adam · 5 comments
Owner

Originally created by @kradalby on GitHub (Sep 25, 2022).

Use case:

I want to be able to pass PRAGMA parameters to sqlite3 so I can enable Journal WAL and busy timeout:

file:mydbfile.db?&_journal_mode=WAL&_busy_timeout=5000

I want to be able to do this so I can back up my database with litestream.

Originally created by @kradalby on GitHub (Sep 25, 2022). Use case: I want to be able to pass PRAGMA parameters to sqlite3 so I can enable Journal WAL and busy timeout: `file:mydbfile.db?&_journal_mode=WAL&_busy_timeout=5000` I want to be able to do this so I can back up my database with [litestream](https://litestream.io/).
adam added the enhancementstale labels 2025-12-29 01:27:18 +01:00
adam closed this issue 2025-12-29 01:27:18 +01:00
Author
Owner

@chriswiggins commented on GitHub (Apr 25, 2023):

Chiming in here, I have set up litestream and did an initial replica of our original headscale DB. The headscale DB restored correctly with our kubernetes init container, and reading the docs it looks like litestream sets the mode to WAL anyway on startup?

@chriswiggins commented on GitHub (Apr 25, 2023): Chiming in here, I have set up litestream and did an initial replica of our original headscale DB. The headscale DB restored correctly with our kubernetes init container, and reading the docs it looks like litestream sets the mode to WAL anyway on startup?
Author
Owner

@chriswiggins commented on GitHub (Apr 25, 2023):

Further to this,I added a new user, restarted the container and it re-pulled in the latest changes. So not sure if we need to be setting those options inside headscale?

@chriswiggins commented on GitHub (Apr 25, 2023): Further to this,I added a new user, restarted the container and it re-pulled in the latest changes. So not sure if we need to be setting those options inside headscale?
Author
Owner

@kev-the-dev commented on GitHub (May 5, 2023):

If I'm understanding correctly #1348 is towards this end by introducing a DBUrl config param which is passed directly into the driver rather then generiting from DBHost, DBUser, etc

@kev-the-dev commented on GitHub (May 5, 2023): If I'm understanding correctly #1348 is towards this end by introducing a `DBUrl` config param which is passed directly into the driver rather then generiting from DBHost, DBUser, etc
Author
Owner

@github-actions[bot] commented on GitHub (Nov 2, 2023):

This issue is stale because it has been open for 180 days with no activity.

@github-actions[bot] commented on GitHub (Nov 2, 2023): This issue is stale because it has been open for 180 days with no activity.
Author
Owner

@github-actions[bot] commented on GitHub (Nov 16, 2023):

This issue was closed because it has been inactive for 14 days since being marked as stale.

@github-actions[bot] commented on GitHub (Nov 16, 2023): This issue was closed because it has been inactive for 14 days since being marked as stale.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#339