[GH-ISSUE #4059] [DOCS]: Migrate from sqlite to postgresql #2587

Closed
opened 2026-02-22 18:30:21 -05:00 by yindo · 2 comments
Owner

Originally created by @tech62 on GitHub (Jun 26, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4059

Description

Hello, i want to migrate the sqlite default db to postgresql.
How can i achieve that ? (exporting workspace and configuration ?)

Thanks for your help !

Originally created by @tech62 on GitHub (Jun 26, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4059 ### Description Hello, i want to migrate the sqlite default db to postgresql. How can i achieve that ? (exporting workspace and configuration ?) Thanks for your help !
yindo added the documentation label 2026-02-22 18:30:21 -05:00
yindo closed this issue 2026-02-22 18:30:21 -05:00
Author
Owner

@timothycarambat commented on GitHub (Jun 26, 2025):

You would do this manually via a script. Grab the anythingllm.db and using whatever language library you wish use an SQLite parser. The schema is published in the schema

Map the table and columns to how you would like. If you are using our pg tag, then the schema is 1:1. Just read and insert each record in every table

@timothycarambat commented on GitHub (Jun 26, 2025): You would do this manually via a script. Grab the `anythingllm.db` and using whatever language library you wish use an SQLite parser. The schema is published in the [schema](https://github.com/Mintplex-Labs/anything-llm/blob/master/server/prisma/schema.prisma) Map the table and columns to how you would like. If you are using our `pg` tag, then the schema is 1:1. Just read and insert each record in every table
Author
Owner

@timothycarambat commented on GitHub (Jun 26, 2025):

You could also just as easily do
sqlite database .dump > /the/path/to/sqlite-dumpfile.sql

Then
psql -d database -U username -W < /the/path/to/sqlite-dumpfile.sql

@timothycarambat commented on GitHub (Jun 26, 2025): You could also just as easily do `sqlite database .dump > /the/path/to/sqlite-dumpfile.sql` Then `psql -d database -U username -W < /the/path/to/sqlite-dumpfile.sql`
yindo changed title from [DOCS]: Migrate from sqlite to postgresql to [GH-ISSUE #4059] [DOCS]: Migrate from sqlite to postgresql 2026-06-05 14:47:24 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2587