Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add hatrac-async-migrate tool and supporting backend API changes #70

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

karlcz
Copy link
Contributor

@karlcz karlcz commented Dec 1, 2023

This tool does not assume that two hatrac servers exist, nor does it call any hatrac REST API to move data. Instead, it exports work from the service database into sqlite3 work file(s) to be processed by workers that have access to both source and destination backing stores. Progress is recorded back to the sqlite work file(s).

The existing (source) service can operate unaffected while the workers replicate bulk data to the destination store. A final merge step is performed with the service offline in order to reintegrate destination storage information back into the service database. After merging, the service should be restarted with the destination storage configuration.

The backend API enhancements allow the migration tool to supply existing object-version IDs during replication, so that the bulk storage may embed this predefined version ID in the storage name rather than generating a new random ID, where applicable.

This tool does not assume that two hatrac servers exist, nor
does it call any hatrac REST API to move data.  Instead, it
exports work from the service database into sqlite3 work file(s)
to be processed by workers that have access to both source
and destination backing stores.  Progress is recorded back to
the sqlite work file(s).

The existing (source) service can operate unaffected while
the workers replicate bulk data to the destination store. A
final merge step is performed with the service offline in
order to reintegrate destination storage information back
into the service database. After merging, the service should
be restarted with the destination storage configuration.

The backend API enhancements allow the migration tool to supply
existing object-version IDs during replication, so that the
bulk storage may embed this predefined version ID in the storage
name rather than generating a new random ID, where applicable.
@karlcz karlcz requested a review from mikedarcy December 1, 2023 01:26
@karlcz karlcz self-assigned this Dec 1, 2023
warn about problems instantiating service singletons
warn about problems importing rest module

but continue so code can be used for migration workers etc.
these swapped some validation rules to force failures, but
are not appropriate for an actual migration task
show brief usage along with usage error when catching exceptions

add explicit help sub-command to get full help
This is an experts-only function that can pattern match which
objects in the hatrac service DB we want to migrate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant