Backing up data in a Postgres DB


We would like to manage a Postgres DB for Concourse using BOSH.

We’ve put in place thus far.

We have considered now how this will be executed.
First, we know we’ll have a manual step that we can run to do a backup:

        export BBR_ARTIFACT_DIRECTORY=/var/vcap/store/postgres/backup
        echo "Uploading file $MANUAL_FILENAME"
        curl -v -X PUT -u ((vault-artifact-repo-username)):((vault-artifact-repo-password)) --upload-file $BBR_ARTIFACT_FILE_PATH${MANUAL_FILENAME}
        echo "Cleaning up..."

We will also have a button to restore step we can run manually.

For scheduled backups, we know we can use a looping “janitor” script ( to complete backups, but we think it might be ‘safer’ to use an os-conf cron job. Any thoughts?