Skip to content

Warning

You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?

Postgres Restore from SQL Backup

Actions
Restore from a Postgres Backup
v4.5
Star (13)

CI Update release version.

postgres-restore

Restore a postgres service container using a sql backup file with psql.

References:

NOTE: This only supports sql backups.

Usage

  • Create a backup using
$ cd [project_root]
$ mkdir backups
$ pg_dump -O -f backups/backup.sql $DATABASE_URL

Add action to .github/workflows

...
    steps:
      - uses: actions/checkout@v2
      - name: Postgres Backup Restore
        uses: tj-actions/postgres-restore@v3
        with:
          database_url: "postgres://test_user:test_password@localhost:5432/test_db"
          backup_file: "backups/backup.sql"

Inputs

Input type required default
database_url string true
backup_file string true

Credits

This package was created with Cookiecutter.

Report Bugs

Report bugs at https://github.com/tj-actions/postgres-restore/issues.

If you are reporting a bug, please include:

  • Your operating system name and version.
  • Any details about your workflow that might be helpful in troubleshooting.
  • Detailed steps to reproduce the bug.

Postgres Restore from SQL Backup is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Restore from a Postgres Backup
v4.5

Postgres Restore from SQL Backup is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.