open-balena
open-balena copied to clipboard
feature: Add migration to remote S3 bucket
This commit adds the option to migrate the registry contents to a remote S3 bucket.
@mwohlert this looks great, though my concern is it's introducing tons of code duplication. Ideally both local and remote methods would reuse the same underlying functionality, parameterised with values appropriate for the case. It's unlikely we'll introduce many further changes to the migrator (in the foreseeable future) for this to be a significant problem, but I'm still reluctant to accept this patch as it is.
The interactive part of the remote migrator is really nice and would be great to have for the local migrator as well. Having the same interface for the two methods should also make merging the two methods straightforward. What do you think?
@dfunckt thanks for your input. I actually wrote that script back in November and used it for our migration, so I need to familiarize with the code again, but your suggestions seem straighforward. Will do as I have the time after work.