This is basically an acceptance test implementing the Point-in-Time Recovery chapter of the pgBackRest User Guide .
$ git clone https://github.com/suhlig/postgres-pitr
$ cd postgres-pitr
$ scripts/setup
$ tmuxinator
When done, issue tmuxinator stop local
, and the VM will be shut down, too.
This project requires Go >= v1.11 because we are using modules.
$ scripts/setup
$ bin/ginkgo -v -r
-
Run tests when they changed:
$ bin/ginkgo watch -v -r
-
Provision using Ansible when a deployment-related file has changed or a new one was added:
$ scripts/watch
-
Optionally, run the linter:
$ bin/golint ./...
- anishnath describes a manual approach
- The Apcelent Tech Blog lists a few Ansible roles
- Federico Campoli's Ansible roles are interesting
- The
systemd
template is based on minio-service
- Use "net/url" in
config.go
- Separate database config (incl. db name, user and password) from DB cluster config
- Optionally restore only a selected databases; see https://pgbackrest.org/user-guide.html#restore/option-db-include
- Do not rely on the
main
cluster, but create a separate one (sudo pg_createcluster 9.4 demo
etc.) - Run
pg_create_restore_point
through native DB driver instead of SSH - Test more than the happy path