0
0
Fork 0
mirror of https://github.com/tj-actions/pg-dump.git synced 2024-12-20 01:18:49 +00:00
:octocat: Github action to generate backup of a postgres database.
Find a file
2021-04-29 22:42:01 +00:00
.github Upgrade to GitHub-native Dependabot 2021-04-29 22:42:01 +00:00
backups Auto updated backup.sql. 2021-03-14 19:31:09 +00:00
.gitignore Initial commit. 2021-01-30 21:26:56 -05:00
action.yml Update action.yml 2021-04-02 10:54:01 -04:00
CONTRIBUTING.md Initial commit. 2021-01-30 21:26:56 -05:00
HISTORY.md Initial commit. 2021-01-30 21:26:56 -05:00
LICENSE Initial commit. 2021-01-30 21:26:56 -05:00
README.md Update README.md 2021-04-02 09:53:32 -04:00
renovate.json Updated renovate.json 2021-04-25 19:35:16 -04:00

CI Update release version.

pg-dump

Run pg_dump to generate a backup

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

NOTE: ⚠️

  • Ensure the backup output file already exists.

Example

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

Inputs

Input type required default description
database_url string true Database URL
path string true Backup file output location
options string true -O Extra options passed to pg_dump

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.