Repository navigation
Conversation
Add scripts/v1_to_v2_migration with two migration paths: one through the v1 and v2 REST APIs (users, spaces as groups, listeners, datasets, folders, files, metadata, tags, thumbnails, comment sidecars) and one that reads v1 MongoDB/GridFS and writes v2 MongoDB/MinIO directly. Both are resumable through a checkpoint file. Supporting changes found while running the migration: - Map Elasticsearch metadata as "flattened" so metadata keys with inconsistent value types no longer fail indexing. - Let admin mode list dataset folders, matching the sibling routes. - docker-compose: Mongo 6 with port 27017 exposed, and no Traefik request body limit on the backend router. - Ignore migration output and the default checkpoint file. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Write password and API-key files with mode 0600, expire and revoke migration keys, skip datasets instead of uploading as admin, and bind Mongo to localhost. Co-authored-by: Cursor <cursoragent@cursor.com>
…them. The v2 dataset id was stored as soon as the dataset was created, so a crashed run treated it as finished and --force created a second dataset. Track phase progress and mark the dataset complete only after its children succeed, reusing the existing v2 id on resume. Co-authored-by: Cursor <cursoragent@cursor.com>
A pagination error used to stop the loop and migrate only the datasets already fetched, with no signal that the inventory was incomplete. Retry transient server errors, then raise so the run cannot continue on a truncated dataset list. Co-authored-by: Cursor <cursoragent@cursor.com>
The inventory command only lists v1 datasets, but it constructed a full migrator and required CLOWDER2_BASE_URL plus a v2 login. Skip the v2 client unless the command actually writes to v2. Co-authored-by: Cursor <cursoragent@cursor.com>
api_clients imports httpx whenever the migration runs, but the package was listed only in the dev group, so a production install could not run the API path. Co-authored-by: Cursor <cursoragent@cursor.com>
sync_users minted a password for every candidate and always saved generated-owner-passwords.json, including when MIGRATION_DRY_RUN was set and no users were created. Co-authored-by: Cursor <cursoragent@cursor.com>
_stream_file_to_minio read the whole object into memory before upload, so a large file could exhaust the migration host. Pass the GridFS stream through and let MinIO read it in parts. Co-authored-by: Cursor <cursoragent@cursor.com>
failures.json and migration-checkpoint.json were written with the process umask, so on a shared host they were more readable than the credential files stored beside them. Co-authored-by: Cursor <cursoragent@cursor.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migration script to migrate a v1 instance to v2.