BCDevOps / backup-container

A simple container for a simple backup strategy.
Apache License 2.0
39 stars 56 forks source link

Getting the verification and restore working for a patroni cluster. #126

Closed thegentlemanphysicist closed 5 months ago

thegentlemanphysicist commented 5 months ago

@WadeBarnes A while back a team member customized the backup.postgress.plugin to get the verification and restore working with Patroni, it's a small addition:

    # Drop Patroni-specific schemas
    if (( ${_rtnCd} == 0 )); then
      psql -h "${_hostname}" ${_portArg} -a -d ${_database} <<EOF
DROP SCHEMA IF EXISTS metric_helpers CASCADE;
DROP SCHEMA IF EXISTS user_management CASCADE;
EOF

      _rtnCd=${?}
      echo
    fi

would you be interested in me creating a PR to submit this to the project? Alternatively I could contribute a separate pluging file, something like backup.postgress-patroni.plugin?

WadeBarnes commented 5 months ago

Yes, please.

thegentlemanphysicist commented 5 months ago

Excellent, created a PR https://github.com/BCDevOps/backup-container/pull/127/files If you'd rather I break it out into a separate plugin file please let me know.