-
Notifications
You must be signed in to change notification settings - Fork 0
gsutil as an example: improve the abstractions #3
Description
Originally this script was just assuming an rsync process to local or remote destinations. To use google cloud as a destination, I made that function (rsync) configurable so that I could use gsync instead. But it also required a special binary and authentication credentials, so those got hacked into the container and various places in the code, which results in ugly spaghetti.
I think a better way to structure this is to define "destination" in a more sophisticated way that treats it just as destination to a pipe, I.e. in a more unixy way. Then we can restrict the scope of this code to something simpler, and create separate projects for different destinations. I probably want to keep the minimal rsync option as a simple destination that's defined in here, but move the gcloud specific stuff into a separate 'backup-rsync' destination project. Strictly speaking, it's no longer using rsync, but it kind of makes sense to keep rsync as the native destination and keep the assumptions that go along with that kind of solution.