-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Description
Using #532, options are provided for backup/restore of databases. This is perfect for recreating VMs with exact configurations. However, as detailed in #534, any DB migration that might be required to switch versions might make this backup data unusable.
Given the varying complexity of various DB migration technologies, one approach could be to simply export the data in a format that is appropriate for the API service that uses the database. Although not as efficient as direct backup/restore of the database, going through the API and underlying data representation can help migrate data across versions, and even potentially across servers not using birdhouse-deploy, while leveraging similar APIs.
Therefore, the backup [create,restore] CLI mode provided by #532 should be further extended to provide an export, which would perform the relevant API/FileSystem/whatever calls to get a "relevant data representation" for that API. An import could be considered as well.
An example use case is STAC API. The exported data should be a nested hierarchy of collections/items. Those could then be reimported in another server / migrated DB using STACpopulator.implementations.DirectoryLoader.
References
- Backup birdhouse data to a restic repository (as a command line option and as a scheduler job) #532
- STAC DB migration for 0.6.10->0.6.13 [WIP post 0.7.x] #534
- https://github.com/crim-ca/stac-populator/tree/master/STACpopulator/implementations/DirectoryLoader
Concerned Organizations
all