bcgov / cas-pipeline

A collection of make functions used to compose pipelines
Apache License 2.0
0 stars 0 forks source link

allow rsync to be run against stopped pods in a deployment config #2

Closed wenzowski closed 3 years ago

wenzowski commented 5 years ago

This doesn't handle any of the work to oc scale down to zero...just running rsync from within a debug pod. I was thinking that if we need something (eg. metabase) to be offline before we rsync its data dir (eg. embedded h2 files) then we'd make a separate backup macro that calls this one.

wenzowski commented 5 years ago

usage of this macro might look like:

.PHONY: rsync
rsync: whoami
    $(call oc_rsync,cas-ggircs-postgres,/tmp,./tmp)

where the first argument is the name of the deploymentconfig, the 2nd the name of the remote folder, the 3rd the name of the local folder.

Perhaps a better idea would be to have this split in two macros oc_push and oc_pull? Right now this only pulls files from the remote folder to the local folder.

matthieu-foucault commented 5 years ago

I like oc_push and oc_pull. I imagine that some macro like oc_sync, that pulls in a temp dir and pushes to a different namespace could be useful to migrate data between namespaces

wenzowski commented 5 years ago

As discussed, I'll also add a passthrough for rsync options

matthieu-foucault commented 3 years ago

This feature isn't needed anymore for backups or data transfers, as we are now using wal-g and cloud storage