Enhancement: backup docs for LibreChat.ai install #3005
Replies: 4 comments
-
Sure, PRs are welcome on the docs repo: https://github.com/LibreChat-AI/librechat.ai |
Beta Was this translation helpful? Give feedback.
-
Was running out of the house when I first saw this, I can answer some of the questions specifically
What you listed is pretty much it but I think we would need to backup the vectors from postgresql, not sure what the process would be. Technically, meilisearch could be backed up too, but the indices get rebuilt rather quickly when you migrate so it's not really necessary.
Feel free to submit a PR, this specific link goes over how to get started. You can basically run the website locally and even preview how it would look like: |
Beta Was this translation helpful? Give feedback.
-
Ok some initial notes: This needs an option to backup EVERYTHING, and to also remove API keys/SECRET/etc. FilesConfig filesLibreChat/.env - needs an option to remove the API keys Log filesDocker: LibreChat/logs/ MongoDBhttps://www.mongodb.com/docs/database-tools/mongodump/ Dump the entire MongoDB:
Find the database nameSearch .env:
Find the IPIf MONGO_URI is NOT 127.0.0.1 then we can probably use that IP. Docker:
Meili searchhttps://www.meilisearch.com/docs/learn/advanced/snapshots_vs_dumps Snapshots are highly efficient, but not portable between different versions of Meilisearch. Use snapshots for periodic data backups. Dumps are portable between different Meilisearch versions, but not very efficient. Use dumps when updating to a new Meilisearch release. Vector databaseusing pgvector, so PostgreSQL https://www.postgresql.org/docs/current/app-pgdump.html rag.yml has the default configs for it. Find the IP:
|
Beta Was this translation helpful? Give feedback.
-
Meilisearch backup:
Please note that the export dir is already protected in .gitignore: meili_data* |
Beta Was this translation helpful? Give feedback.
-
What features would you like to see added?
I'd like to write some backup and restore docs and script snippet examples for librechat (independent of how it is installed, e.g. podman/docker/local/whatever), can I suggest under "User Guides" we add a backup section?
e.g. it's actually pretty easy to grab all the data from mongo, if using docker for example:
mongodump -h MongoDB_server -d LibreChat -o [BACKUP DIR]
and you can get MongoDB server depending on how you installed it, e.g. docker:
docker ps | grep "chat-mongodb$" | cut -d" " -f1 | xargs docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}'
the mongodump gets you all your mongo data, and you can use bsondump to inspect the bson files easily and convert them to text suitable for checking into a git repo for example.
That and your librechat.yaml and .env file, what else is needed to backup and restore a system?
Also need to grab vector, meilisearch, the logs, etc.
What is the correct way to go about doing this, e.g. discuss it, submit a PR, something else?
More details
I'd like to write this document since I need to backup my installs anyways and it's good to share. I suspect a lot more people will want to use librechat in production like myself which means backups, exporting/importing data and so on.
Which components are impacted by your request?
General
Pictures
No response
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions