0
0
Fork 0
mirror of https://github.com/tj-actions/pg-dump.git synced 2024-09-30 14:35:17 +00:00
:octocat: Github action to generate backup of a postgres database.
Find a file
github-actions[bot] 4a7370f13b
Some checks failed
CI / Test pg_dump (push) Failing after 17s
Format README.md / sync-assets (push) Failing after 0s
Codacy Security Scan / Codacy Security Scan (push) Failing after 10s
CI / Run shellcheck (push) Failing after 2s
CI / Test pg_dump with PostgreSQL version (12) (push) Failing after 21s
CI / Test pg_dump with PostgreSQL version (14) (push) Failing after 20s
CI / Test pg_dump with PostgreSQL version (15) (push) Failing after 19s
Auto updated backup.sql.
2024-09-16 04:20:41 +00:00
.github chore(deps): update reviewdog/action-shellcheck action to v1.27 2024-09-16 04:20:41 +00:00
backups Auto updated backup.sql. 2024-09-16 04:20:41 +00:00
.gitignore Initial commit. 2021-01-30 21:26:56 -05:00
.whitesource Added .whitesource 2021-07-02 12:52:34 -04:00
action.yml chore(deps): update tj-actions/install-postgresql action to v3 2023-11-30 00:29:48 +00:00
CODE_OF_CONDUCT.md Added CODE_OF_CONDUCT.md 2021-07-02 16:43:52 -04:00
CONTRIBUTING.md Initial commit. 2021-01-30 21:26:56 -05:00
entrypoint.sh feat: add support for installing postgresql (#135) 2023-09-12 13:02:42 -06:00
HISTORY.md Upgraded from v3.0 -> v3.0.1 (#143) 2024-01-06 13:01:34 -07:00
LICENSE Initial commit. 2021-01-30 21:26:56 -05:00
README.md Updated README.md 2024-02-22 04:58:59 +00:00
renovate.json Updated renovate.json 2023-07-05 12:20:56 -06:00

Ubuntu Mac OS Windows Public workflows that use this action.

Codacy Badge CI Update release version.

pg-dump

Run pg_dump to generate a backup

Usage

Using the default PostgreSQL installed on the runner

...
    steps:
      - uses: actions/checkout@v2
      - name: Postgres Dump Backup
        uses: tj-actions/pg-dump@v3
        with:
          database_url: "postgres://test_user:test_user_password@localhost:5432/testdb"
          path: "backups/backup.sql" 
          options: "-O"   

Using a different PostgreSQL version

...
    steps:
      - uses: actions/checkout@v2
      - name: Postgres Dump Backup
        uses: tj-actions/pg-dump@v3
        with:
          database_url: "postgres://test_user:test_user_password@localhost:5432/testdb"
          postgresql_version: "16"  # Note: Only the major version is required e.g. 12, 14, 15, 16
          path: "backups/backup.sql" 
          options: "-O"   

If you feel generous and want to show some extra appreciation:

Support this project with a

Buy me a coffee

Inputs

INPUT TYPE REQUIRED DEFAULT DESCRIPTION
database_url string true Database URL
options string true "-O" Extra options passed to pg_dump
path string true Backup file output location
postgresql_version string false Version of PostgreSQL. e.g 15

Credits

This package was created with Cookiecutter.

Report Bugs

Report bugs at https://github.com/tj-actions/pg-dump/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.