Replies: 3 comments 3 replies
-
|
The official documentation doesn't provide a specific migration procedure for moving between S3 buckets or object storage systems. However, based on the available information, here's what you need to know: Langfuse uses S3/blob storage to store raw events, multi-modal inputs, batch exports, and other files(1). The system allows you to configure separate buckets for different use cases using environment variables(1):
Each configuration supports a prefix parameter (ending with Recommended approach for migration: Since there's no documented migration procedure, you would need to:
Important considerations: For media uploads specifically, setting a retention policy on the media bucket is not recommended because referenced media files in traces would break and future uploads of the same file would fail since file upload status is tracked by hash in Postgres(2). This means you need to ensure all media files are successfully copied during migration. For a zero-downtime approach similar to the v2 to v3 upgrade strategy, you could provision new Langfuse instances with the new storage configuration and shift traffic after validation(3), though this would require maintaining both storage systems temporarily. I'd recommend reaching out to Langfuse support for specific guidance on your migration scenario to ensure no data loss. 📚 Sources: Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
-
|
You're correct to be concerned about S3 path references in ClickHouse. The documentation doesn't provide a built-in migration script for S3 bucket changes that automatically updates ClickHouse references(1)(2). How S3 references work in Langfuse: When events are stored in S3, the worker processes them and upserts data into ClickHouse(3). Once the worker has processed events from S3 into ClickHouse, the blob storage items are technically no longer needed for normal operation(3). However, the documentation recommends keeping events for as long as you want to access them within the UI or update them, with 30 days being a typical retention period(1)(3). The reference challenge: There's no documented automatic mechanism to update S3 path references stored in ClickHouse when you migrate buckets(1)(2). If ClickHouse contains hardcoded S3 paths pointing to your old bucket, simply copying files to a new bucket and updating environment variables won't automatically update those existing references. Available recovery mechanism: Langfuse does include a manual replay script for reprocessing S3 events into ClickHouse(4). This script is located at
This would allow you to reprocess events from your new bucket location, but it's designed as a recovery tool rather than a migration script(4). Recommendation: The documentation doesn't provide a dedicated S3 migration tool that handles reference updates. For your use case, you would likely need to:
I recommend contacting Langfuse support directly about your specific migration scenario, as there's no officially documented migration procedure for S3 bucket changes that preserves ClickHouse references(1)(2). 📚 Sources:
Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
-
|
@andresC98 Do you use batch export and media uploads? Or is this only focused on event data? You can check this by looking into the upload timestamps for a few events and find the delta between the first and the last writes. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe your question
Do you recommend any specific approach when migrating to a different s3 bucket (or object storage system) when having Langfuse self hosted? In the event we wanted to migrate our object storage / bucket to a different one; is there any approach to follow in order not to lose existing data and make the migration seamless to users (w/out data loss)?
Langfuse Cloud or Self-Hosted?
Self-Hosted
If Self-Hosted
3.149.0
If Langfuse Cloud
No response
SDK and integration versions
No response
Pre-Submission Checklist
Beta Was this translation helpful? Give feedback.
All reactions