Efficient means for migrating a collection from one service to another #286

Open
opened 2026-10-09 09:13:54 +00:00 by mih · 1 comment
Owner

At the moment this appears to need custom tooling, and also administrator access at both outgoing and incoming service. The latter to obtain and then instantiate a collection's configuration. This appears to make it hard to perform migrations.

It could be argued that the base collection setup cannot really be migrated (because the auth setup is likely to be very different, or should be different). At most it could be recreated "in spirit".

Assuming a collection is already recreated empty at the new service, it appears that the following steps are necessary:

  • query old /server and find the right object in .collectionsp[] that matches the source collection, to be able to extract .classes for it
  • query old /{collection}/incoming/ to determine existing inboxes
  • loop over these classes and do
    • query old /{collection}/curated/records/{class_name} and feed the outcome to new /{collection}/curated/record/{class_name}
    • query old /{collection}/incoming/{label}/records/p/{class_name} and feed the outcome to new /{collection}/incoming/{label}/record/{class_name} -- possibly mapping to a new inbox name

This approach takes the route via explicit per-class processing, because while there is /{collection}/curated/records/ to read, there is no equivalent endpoint to post "any" record.

At the moment this appears to need custom tooling, and also administrator access at both outgoing and incoming service. The latter to obtain and then instantiate a collection's configuration. This appears to make it hard to perform migrations. It could be argued that the base collection setup cannot really be migrated (because the auth setup is likely to be very different, or should be different). At most it could be recreated "in spirit". Assuming a collection is already recreated empty at the new service, it appears that the following steps are necessary: - query old `/server` and find the right object in `.collectionsp[]` that matches the source collection, to be able to extract `.classes` for it - query old `/{collection}/incoming/` to determine existing inboxes - loop over these classes and do - query old `/{collection}/curated/records/{class_name}` and feed the outcome to new `/{collection}/curated/record/{class_name}` - query old `/{collection}/incoming/{label}/records/p/{class_name}` and feed the outcome to new `/{collection}/incoming/{label}/record/{class_name}` -- possibly mapping to a new inbox name This approach takes the route via explicit per-class processing, because while there is `/{collection}/curated/records/` to read, there is no equivalent endpoint to post "any" record.
Owner

Good point. After dropping the auto-generated per-class endpoints it would only be natural to add an endpoint that accepts any class.

Good point. After dropping the auto-generated per-class endpoints it would only be natural to add an endpoint that accepts any class.
Sign in to join this conversation.
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
orinoco/dump-things-service#286
No description provided.