Giter Club home page Giter Club logo

pg-dump's People

Contributors

codacy-badger avatar dependabot-preview[bot] avatar dependabot[bot] avatar github-actions[bot] avatar jackton1 avatar renovate-bot avatar renovate[bot] avatar repo-ranger[bot] avatar tj-actions-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pg-dump's Issues

[Feature] Choose Postgres version

Is your feature request related to a problem? Please describe.

I actually have a Postgres 14 db but the action trigger that a version mismatch occur

Describe the solution you'd like?

configure the version in the yml

Describe alternatives you've considered?

No response

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Server version mismatch

Is there an existing issue for this?

  • I have searched the existing issues

Does this issue exist in the latest version?

  • I'm using the latest release

Describe the bug?

I'm proxying a database connection to a Postgres app hosted on fly.io. I receive the following error:

pg_dump: error: server version: 15.3 (Debian 15.3-1.pgdg120+1); pg_dump version: 14.9 (Ubuntu 14.9-1.pgdg22.04+1)
pg_dump: error: aborting because of server version mismatch
Error: Process completed with exit code 1.

I've seen in #35 that the action should be agnostic regarding Postgres versions, so I've filed this as a bug.

To Reproduce

name: Backup postgres database
on:
  workflow_dispatch: 
jobs:
  backup:
    name: Postgres backup
    runs-on: ubuntu-latest
    env:
      FLY_API_TOKEN: ${{ secrets.FLY_POSTGRES_APP_API_TOKEN }}
      POSTGRES_APP_NAME: ${{ vars.POSTGRES_APP_NAME }}
      PG_PASSWORD: ${{ secrets.POSTGRES_PASS }}
      PG_USER: ${{ vars.POSTGRES_USER }}
      PG_DBNAME: ${{ vars.POSTGRES_DB_NAME }}
      BACKUPS_DIR: backups/postgres
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
      - name: Set up flyctl
        uses: superfly/flyctl-actions/setup-flyctl@master
      - name: Proxy to app
        run: flyctl proxy 5432 -a ${{ env.POSTGRES_APP_NAME }} &
      - name: Get current date and time
        id: timestamp
        run: echo "TIMESTAMP=$(date +'%Y-%m-%dT%H:%M:%S%z')" >> $GITHUB_ENV
      - name: Set output path
        run: |
          echo "OUTPUT_PATH=${{ env.BACKUPS_DIR }}/db${{ env.TIMESTAMP }}.backup" >> $GITHUB_ENV
      - name: Sleep 3 seconds
        run: sleep 3
      - name: Postgres Dump Backup
        uses: tj-actions/[email protected]
        with:
          database_url: "postgres://${{ env.PG_USER }}:${{ env.PG_PASSWORD }}@localhost:5432/${{ env.PG_DBNAME }}"
          path: ${{ env.OUTPUT_PATH }} 
          options: "-Fc"  

What OS are you seeing the problem on?

ubuntu-latest or ubuntu-22.04

Expected behavior?

completion of the action

Relevant log output

pg_dump: error: server version: 15.3 (Debian 15.3-1.pgdg120+1); pg_dump version: 14.9 (Ubuntu 14.9-1.pgdg22.04+1)
pg_dump: error: aborting because of server version mismatch
Error: Process completed with exit code 1.

Has all relevant logs been included?

  • I've included all relevant logs

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/codacy-analysis.yml
  • actions/checkout v4
  • codacy/codacy-analysis-cli-action v4.4.0
  • github/codeql-action v3
.github/workflows/rebase.yml
  • actions/checkout v4
  • cirrus-actions/rebase 1.8
.github/workflows/sync-release-version.yml
  • actions/checkout v4
  • tj-actions/release-tagger v4
  • tj-actions/sync-release-version v13
  • tj-actions/git-cliff v1
  • peter-evans/create-pull-request v6.0.5
.github/workflows/test.yml
  • actions/checkout v4
  • reviewdog/action-shellcheck v1.20
  • actions/checkout v4
  • tj-actions/verify-changed-files v20
  • actions/checkout v4
  • tj-actions/verify-changed-files v20
  • postgres 9.6.24
.github/workflows/update-readme.yml
  • actions/checkout v4
  • tj-actions/auto-doc v3
  • tj-actions/remark v3
  • tj-actions/verify-changed-files v20
  • peter-evans/create-pull-request v6
action.yml
  • tj-actions/install-postgresql v3

  • Check this box to trigger a request for Renovate to run again on this repository

[BUG] Adding more than 1 option breaks the argument

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug?

image

      - name: pg_dump into local file
        uses: tj-actions/pg-dump@v1
        with:
          database_url: "postgresql://...
          path: dump.sql
          options: -O --compress=5

To Reproduce

      - name: pg_dump into local file
        uses: tj-actions/pg-dump@v1
        with:
          database_url: "postgresql://...
          path: dump.sql
          options: -O --compress=5

What OS are you seeing the problem on?

ubuntu-latest or ubuntu-20.04

Expected behavior?

pg_dump -O --compress=5 -f "dump.sql" -d "***

Relevant log output

pg_dump "-O --compress=5" -f "dump.sql" -d "***

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

[Feature] Make it easy to encrypt the database and send it to third party storage

Is this feature missing in the latest version?

  • I'm using the latest release

Is your feature request related to a problem? Please describe.

No

Describe the solution you'd like?

I'm basically looking to use this GH action as a full-featured way to create PSQL database backups and send them, encrypted, to a storage somewhere. I'd like it to be as simple and foolproof as possible, so potentially sending the encrypted database to Dropbox would be easy to manage.

I'd be happy to help with a PR if this seems like an appropriate/doable feature for the repo!

Describe alternatives you've considered?

backupsheep.com, simplebackups.com

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

[BUG] postgres_version: "16" is failing

Is there an existing issue for this?

  • I have searched the existing issues

Does this issue exist in the latest version?

  • I'm using the latest release

Describe the bug?

Logs:

Run tj-actions/pg-dump@v3
Run tj-actions/install-postgresql@v2

Run bash $GITHUB_ACTION_PATH/entrypoint.sh
setup-postgresql
Verifying version
Error: 16 is not between 10 and 15 (inclusive).
Error: Process completed with exit code 1.

To Reproduce

  1. runs-on: ubuntu-latest
  2. postgresql_version: "16"

What OS are you seeing the problem on?

ubuntu-latest or ubuntu-22.04

Expected behavior?

Please add support for latest version of postgres

Relevant log output

Run tj-actions/pg-dump@v3
Run tj-actions/install-postgresql@v2
  
Run bash $GITHUB_ACTION_PATH/entrypoint.sh
setup-postgresql
  Verifying version
  Error: 16 is not between 10 and 15 (inclusive).
  Error: Process completed with exit code 1.

Has all relevant logs been included?

  • I've included all relevant logs

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.