The Wayback Machine - https://web.archive.org/web/20201022021404/https://github.com/suhlig/postgres-pitr
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
bin
 
 
 
 
 
 
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.markdown

Spike on Postgres PITR

This is basically an acceptance test implementing the Point-in-Time Recovery chapter of the pgBackRest User Guide .

TL;DR

$ 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.

Development

This project requires Go >= v1.11 because we are using modules.

Setup

$ scripts/setup

Run Tests

$ bin/ginkgo -v -r

Iterate

  • 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 ./...

References

TODO

  • 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
You can’t perform that action at this time.