Geo: Support database backup from secondary
Problem to solve
There may be a noticeable performance penalty when running a regularly scheduled rake backup task against a large primary postgresql database.
For performance-minded customers managing large geo-replicated and heavily-used instances, it may be beneficial to avoid backing up the primary database (i.e. as
gitlab-rake gitlab:backup does) and instead take the backup from the geo-replicated secondary.
This could be a configurable setting in GitLab.
It's important that the restore of a secondary backup behave similarly to the primary backup. I would call #209813 a prerequisite, or at least closely-tied.